Skip to content

Commit

Permalink
Fix dev-ui-install.sh
Browse files Browse the repository at this point in the history
I ran into this when i tried running it in a non-POSIX shell. Nothing
happened. Bash, when asked to run a script without a shebang will
interpret it itself, while other shells behave differently (and I think
this even depends on the OS – BSD (like macOS) & Linux handle `execvp`
differently).

This adds a shebang and some “strict” settings.
  • Loading branch information
sellout committed Aug 20, 2024
1 parent e388786 commit b1a4d73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev-ui-install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env sh
set -eu

echo "This script downloads the latest Unison Local UI release"
echo "and puts it in the correct spot next to the unison"
echo "executable built by stack."
Expand All @@ -7,4 +10,4 @@ stack build
curl -L https://github.com/unisonweb/unison-local-ui/releases/download/latest/unisonLocal.zip --output unisonLocal.zip
parent_dir="$(dirname -- $(stack exec which unison))"
mkdir -p "$parent_dir/ui"
unzip -o unisonLocal.zip -d "$parent_dir/ui"
unzip -q -o unisonLocal.zip -d "$parent_dir/ui"

0 comments on commit b1a4d73

Please sign in to comment.