diff options
author | Bignaux Ronan <ronan@aimao.org> | 2020-03-04 15:10:11 +0100 |
---|---|---|
committer | Bignaux Ronan <ronan@aimao.org> | 2020-03-04 15:10:11 +0100 |
commit | 3443b693cc10522cf5513419ba7266afb0ce5da1 (patch) | |
tree | 53109028c2762b2794ef6576288b0d143d6df6de | |
parent | 92b36343a8ea29de1bd6d2c3920323ce8b4a1ea8 (diff) |
appimage: fix suspicious ownership
-rw-r--r-- | pkgs/build-support/appimage/default.nix | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/build-support/appimage/default.nix b/pkgs/build-support/appimage/default.nix index 7459a028f076e..c56aae4c599c5 100644 --- a/pkgs/build-support/appimage/default.nix +++ b/pkgs/build-support/appimage/default.nix @@ -13,7 +13,7 @@ rec { @sh "appimageSignature=\(.appimageSignature) appimageType=\(.appimageType)"') # check AppImage signature - if [[ $appimageSignature != "AI" ]]; then + if [[ "$appimageSignature" != "AI" ]]; then echo "Not an appimage." exit fi @@ -25,14 +25,13 @@ rec { ;; 2) - install $src ./appimage - # multiarch offset one-liner using same method as AppImage # see https://gist.github.com/probonopd/a490ba3401b5ef7b881d5e603fa20c93 - offset=$(r2 ./appimage -nn -Nqc "pfj.elf_header @ 0" |\ + offset=$(r2 $src -nn -Nqc "pfj.elf_header @ 0" |\ jq 'map({(.name): .value}) | add | .shoff + (.shnum * .shentsize)') - unsquashfs -q -d $out -o $offset ./appimage + unsquashfs -q -d $out -o $offset $src + chmod go-w $out ;; # 3) get ready, https://github.com/TheAssassin/type3-runtime |