Skip to content
Snippets Groups Projects
Commit 348dd4a8 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Update status script

parent 1f7128c4
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ function usage {
echo " unpublish" >&2
echo " stage" >&2
echo " unstage" >&2
echo " status" >&2
echo " tar" >&2
echo " untar" >&2
echo " update" >&2
......@@ -109,6 +110,17 @@ function op {
rm -f source.tar
fi
;;
status)
if [ -n "$TAR" ]
then
tar --compare --file="source.tar" -C "source" --strip-components=1 2>&1 |
grep -v "tar: :" | grep -v '\(Mod time\|Mode\|Gid\|Uid\) differs' ||
true
elif [ -n "$GIT" ]
then
git -C source diff --name-status
fi
;;
update)
pushd source > /dev/null
skip=0
......
......@@ -12,15 +12,13 @@ fi
for recipe in $recipes
do
echo -e "\e[1m$recipe\e[0m"
if [ -d "recipes/$recipe/source/.git" ]
if [ -d "recipes/$recipe/source" ]
then
git -C "recipes/$recipe/source" status
elif [ -e "recipes/$recipe/source.tar" ]
then
echo "Using source tarball"
tar --compare --file="recipes/$recipe/source.tar" -C "recipes/$recipe/source" --strip-components=1 2>&1| grep -v "tar: :" | grep -v '\(Mode\|Gid\|Uid\) differs' || true
else
echo "No original source found"
status="$(COOK_QUIET=1 ./cook.sh "$recipe" status)"
if [ -n "$status" ]
then
echo -e "\e[1m$recipe\e[0m\n$status"
fi
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment