aboutsummaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorOmar Rizwan <omar.rizwan@gmail.com>2020-10-30 00:50:07 -0700
committerOmar Rizwan <omar.rizwan@gmail.com>2020-10-30 00:50:07 -0700
commitc4245fdf7b907a3ba48b15be8a422dabb6d8b32c (patch)
treeebf7c05a17d2c9328ac6b1f9e14dd7466140d7fb /install.sh
parent52484f6e0ab30e53986e863e31ac60703e52800d (diff)
check for 0 arguments in install.sh.
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/install.sh b/install.sh
index 97235ea..fc0c3c3 100755
--- a/install.sh
+++ b/install.sh
@@ -1,8 +1,9 @@
#!/bin/bash -eux
-if [[ ! ( ( "$1" == "firefox" && "$#" -eq 1 ) ||
- ( "$1" == "chrome" && "$#" -eq 2 && ${#2} -eq 32 ) ||
- ( "$1" == "chromium" && "$#" -eq 2 && ${#2} -eq 32 ) ) ]]; then
+if [[ "$#" -lt 1 || (
+ ! ( ( "$1" == "firefox" && "$#" -eq 1 ) ||
+ ( "$1" == "chrome" && "$#" -eq 2 && ${#2} -eq 32 ) ||
+ ( "$1" == "chromium" && "$#" -eq 2 && ${#2} -eq 32 ) ) ) ]]; then
echo "Usage: $0 <chrome EXTENSION_ID | chromium EXTENSION_ID | firefox>"
exit 2
fi