mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-27 15:14:35 +00:00
Fix AppImage post-step aborting on no-op mv.
linuxdeploy already writes the final path; renaming the file onto itself failed under set -e. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
1179ae1f7d
commit
b49c456098
1 changed files with 18 additions and 11 deletions
|
|
@ -97,20 +97,27 @@ run_linuxdeploy \
|
||||||
--plugin gtk \
|
--plugin gtk \
|
||||||
--output appimage
|
--output appimage
|
||||||
|
|
||||||
# linuxdeploy may write the AppImage into the cwd; normalise the name/location.
|
# linuxdeploy may write the AppImage into the cwd under another name;
|
||||||
shopt -s nullglob
|
# only rename when it is not already at the expected path (mv same→same
|
||||||
for f in "$ROOT"/*.AppImage "$ROOT/dist"/*.AppImage; do
|
# fails under `set -e` and was aborting an otherwise successful build).
|
||||||
|
DEST="$ROOT/dist/$OUT_NAME"
|
||||||
|
if [[ ! -f "$DEST" ]]; then
|
||||||
|
shopt -s nullglob
|
||||||
|
for f in "$ROOT"/*.AppImage "$ROOT/dist"/*.AppImage; do
|
||||||
case "$(basename "$f")" in
|
case "$(basename "$f")" in
|
||||||
linuxdeploy*|appimagetool*) continue ;;
|
linuxdeploy*|appimagetool*) continue ;;
|
||||||
esac
|
esac
|
||||||
mv -f "$f" "$ROOT/dist/$OUT_NAME"
|
mv -f "$f" "$DEST"
|
||||||
done
|
break
|
||||||
shopt -u nullglob
|
done
|
||||||
|
shopt -u nullglob
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -f "$ROOT/dist/$OUT_NAME" ]]; then
|
if [[ ! -f "$DEST" ]]; then
|
||||||
echo "AppImage was not created" >&2
|
echo "AppImage was not created" >&2
|
||||||
|
find "$ROOT" "$ROOT/dist" -maxdepth 2 -name '*.AppImage' -print >&2 || true
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod +x "$ROOT/dist/$OUT_NAME"
|
chmod +x "$DEST"
|
||||||
echo "Created dist/$OUT_NAME"
|
echo "Created dist/$OUT_NAME"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue