0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2025-01-18 02:12:30 -05:00

improved error handling

This commit is contained in:
Bert van der Weerd 2022-04-13 13:05:14 +02:00
parent 6edbe91fd6
commit ba09c9f2bc
No known key found for this signature in database
GPG key ID: 4CFABB96ADE0F5B1

View file

@ -12,7 +12,7 @@ fi
failed_patches=
echo "Removing '$tmpdir'..." echo "Removing '$tmpdir'..."
rm -rf $tmpdir rm -rf $tmpdir
@ -38,6 +38,8 @@ for i in $(cat ../../assets/patches.txt); do
done done
s=$s s=$s
if [ ! -z "$s" ]; then if [ ! -z "$s" ]; then
s=$(echo $i)
failed_patches="$failed_patches [$s]"
echo "" echo ""
for k in $s; do for k in $s; do
echo "--> $s:" echo "--> $s:"
@ -53,4 +55,14 @@ cd ../..
echo "" echo ""
echo "Removing '$tmpdir'..." echo "Removing '$tmpdir'..."
rm -rf $tmpdir rm -rf $tmpdir
echo ""
if [ ! -z "$failed_patches" ]; then
echo $failed_patches
echo ""
echo "error: Some patches failed!"
exit 1
else
echo "success: All patches where applied successfully."
exit 0 exit 0
fi