Merge pull request #146610 from l0b0/fix-keen4-shellcheck-lints

keen4: Fix ShellCheck lints
This commit is contained in:
Robert Hensing 2021-11-19 22:48:38 +01:00 committed by GitHub
commit 2441a7992d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,15 @@
source $stdenv/setup
#!/usr/bin/env bash
mkdir -p $out/share/keen4
unzip -j $dist -d $out/share/keen4
set -o nounset
mkdir -p $out/bin
cat > $out/bin/keen4 <<EOF
# shellcheck source=/dev/null
source "${stdenv}/setup"
mkdir -p "${out}/share/keen4"
unzip -j "$dist" -d "${out}/share/keen4"
mkdir -p "${out}/bin"
cat > "${out}/bin/keen4" <<EOF
#! $SHELL -e
if test -z "\$HOME"; then
echo "HOME directory not set"
@ -17,9 +22,9 @@ fi
mkdir -p \$HOME/.keen4
cd \$HOME/.keen4
ln -sf $out/share/keen4/* .
ln -sf "${out}/share/keen4/"* .
$dosbox/bin/dosbox ./KEEN4E.EXE -fullscreen -exit || true
"${dosbox}/bin/dosbox" ./KEEN4E.EXE -fullscreen -exit || true
# Cleanup the symlinks.
for i in *; do
@ -28,4 +33,4 @@ for i in *; do
fi
done
EOF
chmod +x $out/bin/keen4
chmod +x "${out}/bin/keen4"