-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hi,,
So I wanted to try out this package and ran into a problem with the Makefile. Specifically, make install runs sed -i.bak 's|SCRIPT_DIR.*|SPINNERS_JSON="/usr/local/share/bash-cli-spinners/spinners.json"|' /usr/local/bin/spinner.
I'm not exactly sure what change this command was intended to make, but in its current state, the sed command modifies the copy of spinner.sh in /usr/local/bin/spinner such that these two lines
Lines 9 to 10 in 79434c5
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| SPINNERS_JSON="$SCRIPT_DIR/spinners.json" |
change into
SPINNERS_JSON="/usr/local/share/bash-cli-spinners/spinners.json"
SPINNERS_JSON="$SPINNERS_JSON="/usr/local/share/bash-cli-spinners/spinners.json"...which isn't syntactically correct (causing the script to abort before it does anything) and can't be what was intended. (Maybe there was an earlier version of spinner.sh where the replacement regex did what was intended?
While I'm not 100% sure what the author was going for, if it helps, here are two possible ways to make the script work:
-
Remove the
sedcommand from theMakefileand replace theSCRIPT_DIR=...line inspinner.shwithfor SCRIPT_DIR in "$(dirname "${BASH_SOURCE[0]}")" /usr/local/share/bash-cli-spinners; do [ -f "${SCRIPT_DIR}/spinners.json" ] && break done
-
Change the sed command to something like
sed -i.bak 's|^\s*SCRIPT_DIR=.*$$|SCRIPT_DIR="/usr/local/share/bash-cli-spinners"|' /usr/local/bin/spinner(Note: the
$$is how you escape a$in aMakefile)