Have a little, have a little, have a little faith in the programs

gf-arm64
FriendlyNeighborhoodShane 4 years ago
parent 9725e6809d
commit 504509698a

@ -110,9 +110,8 @@ echo " ";
echo " - Zipping files...";
cd "$tmpdir" || abort "Can't cd to $tmpdir";
zip -r9q "$tmpdir/release.zip" "." || abort "Can't zip package";
zip -r9q "$tmpdir/release.zip" "." || abort "Zip failed";
cd "$workdir" || abort "Can't cd to $workdir";
[ -f "$tmpdir/release.zip" ] || abort "Zip failed";
# Post build actions
@ -124,8 +123,7 @@ echo " ";
echo " - Copying zip to releases...";
mkdir -p "$reldir";
mv -f "$tmpdir/release.zip" "$reldir/MinMicroG-$variant-$ver-$buildtime.zip";
[ -f "$reldir/MinMicroG-$variant-$ver-$buildtime.zip" ] || abort "Move failed";
mv -f "$tmpdir/release.zip" "$reldir/MinMicroG-$variant-$ver-$buildtime.zip" || abort "Move failed";
# Done

@ -106,12 +106,9 @@ for repo in $(echo "$stuff_repo" | select_word 1); do
repourl="$(echo "$line" | select_word 2)";
[ "$repourl" ] || { echo "ERROR: Repo $repo has no URL" >&2; continue; }
echo " -- REPO: Downloading repo $repo";
curl -L --progress-bar "$repourl/index-v1.jar" -o "$tmpdir/repos/$repo.jar";
[ -f "$tmpdir/repos/$repo.jar" ] || { echo "ERROR: Repo $repo failed to download" >&2; continue; }
unzip -oq "$tmpdir/repos/$repo.jar" "index-v1.json" -d "$tmpdir/repos/";
[ -f "$tmpdir/repos/index-v1.json" ] || { echo "ERROR: Repo $repo failed to unzip" >&2; continue; }
mv -f "$tmpdir/repos/index-v1.json" "$tmpdir/repos/$repo.json";
[ -f "$tmpdir/repos/$repo.json" ] || { echo "ERROR: Repo $repo failed to rename" >&2; continue; }
curl -L --progress-bar "$repourl/index-v1.jar" -o "$tmpdir/repos/$repo.jar" || { echo "ERROR: Repo $repo failed to download" >&2; continue; }
unzip -oq "$tmpdir/repos/$repo.jar" "index-v1.json" -d "$tmpdir/repos/" || { echo "ERROR: Repo $repo failed to unzip" >&2; continue; }
mv -f "$tmpdir/repos/index-v1.json" "$tmpdir/repos/$repo.json" || { echo "ERROR: Repo $repo failed to rename" >&2; continue; }
done;
# Download assets
@ -177,13 +174,11 @@ for object in $(echo "$stuff_download" | select_word 1); do
objectfile="$tmpdir/$objectname";
echo " ---- Downloading $objecturl";
curl -L --progress-bar "$objecturl" -o "$objectfile" || { echo "ERROR: $object failed to download" >&2; continue; }
[ -f "$objectfile" ] || { echo "ERROR: $object failed to download" >&2; continue; }
echo "NAME: $objectname, FILE: $object, URL: $objecturl;" >> "$updatelog";
;;
esac;
mkdir -p "$resdldir/$(dirname "$object")";
mv -f "$objectfile" "$resdldir/$object";
[ -f "$resdldir/$object" ] || { echo "ERROR: $object failed to copy" >&2; continue; }
mv -f "$objectfile" "$resdldir/$object" || { echo "ERROR: $object failed to copy" >&2; continue; }
done;
# Post update actions

Loading…
Cancel
Save