mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-25 06:14:18 +08:00
Update status script
This commit is contained in:
parent
1f7128c43f
commit
348dd4a8fe
12
cook.sh
12
cook.sh
@ -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
|
||||
|
||||
16
status.sh
16
status.sh
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user