mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
keen4: Fail script if variables are undefined
ShellCheck SC2154.
This commit is contained in:
parent
8737cb2cc4
commit
6f70a225f4
@ -1,13 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o nounset
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source "$stdenv"/setup
|
||||
source "${stdenv}/setup"
|
||||
|
||||
mkdir -p "$out"/share/keen4
|
||||
unzip -j "$dist" -d "$out"/share/keen4
|
||||
mkdir -p "${out}/share/keen4"
|
||||
unzip -j "$dist" -d "${out}/share/keen4"
|
||||
|
||||
mkdir -p "$out"/bin
|
||||
cat > "$out"/bin/keen4 <<EOF
|
||||
mkdir -p "${out}/bin"
|
||||
cat > "${out}/bin/keen4" <<EOF
|
||||
#! $SHELL -e
|
||||
if test -z "\$HOME"; then
|
||||
echo "HOME directory not set"
|
||||
@ -20,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
|
||||
@ -31,4 +33,4 @@ for i in *; do
|
||||
fi
|
||||
done
|
||||
EOF
|
||||
chmod +x "$out"/bin/keen4
|
||||
chmod +x "${out}/bin/keen4"
|
||||
|
Loading…
Reference in New Issue
Block a user