diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-07-24 23:46:14 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-07-24 23:46:14 -0700 |
| commit | f3da7c1f32e030600cb6fc2360a8f2b0b764e458 (patch) | |
| tree | 8c3be708ff213e76b35ff0fae6fb6f3c7f3f28db | |
| parent | e6b0844ecc683a5c470023ec6fb42cc036a1f49c (diff) | |
Replaced bashism "[[" with "test -n"
| -rw-r--r-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -54,10 +54,10 @@ $(NAME): $(NAME).c bterm.h config.h install: $(NAME) @prefix="$(PREFIX)"; \ - if [[ ! $$prefix ]]; then \ + if test -n $$prefix; then \ read -p $$'\033[1mWhere do you want to install? (default: /usr/local) \033[0m' prefix; \ fi; \ - if [[ ! $$prefix ]]; then \ + if test -n $$prefix; then \ prefix="/usr/local"; \ fi; \ mkdir -pv $$prefix/bin $$prefix/share/man/man1 \ @@ -66,10 +66,10 @@ install: $(NAME) uninstall: @prefix="$(PREFIX)"; \ - if [[ ! $$prefix ]]; then \ + if test -n $$prefix; then \ read -p $$'\033[1mWhere do you want to uninstall from? (default: /usr/local) \033[0m' prefix; \ fi; \ - if [[ ! $$prefix ]]; then \ + if test -n $$prefix; then \ prefix="/usr/local"; \ fi; \ echo "Deleting..."; \ |
