summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 19:36:55 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 20:01:07 -0600
commitbeae9b3e2822021fea741fc98282cf9e0fc1d024 (patch)
treeab2c55df74fb068050be1f293b9a9df24721f24f /src/lib
parent1d6066b37e0fd4e7118a3d366d1b6a2168a70286 (diff)
Double bracket ==/</> compare lexicographically, not numerically.
Unfortunately for me, that means that it works correctly *most* of the time. But, for example, [[ 10 < 2 ]], and negatives don't work.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/conf.sh2
-rwxr-xr-xsrc/lib/libreblacklist4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/conf.sh b/src/lib/conf.sh
index 3ec8a8d..67aeb96 100644
--- a/src/lib/conf.sh
+++ b/src/lib/conf.sh
@@ -114,7 +114,7 @@ check_vars() {
local VAR
for VAR in "$@"; do
if [[ -z ${!VAR:-} ]]; then
- if [[ $(list_files $slug|wc -l) > 1 ]]; then
+ if [[ $(list_files $slug|wc -l) -gt 1 ]]; then
echo "Configure '$VAR' in one of:"
list_files $slug | sed 's/./ -> &/'
else
diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist
index 1d73d2f..627bb39 100755
--- a/src/lib/libreblacklist
+++ b/src/lib/libreblacklist
@@ -103,7 +103,7 @@ if [[ "${0##*/}" == libreblacklist ]]; then
sed 's/\r/\n/g'<<<"$1"|sed '/^$/d'
}
usage() {
- if [[ $# == 0 ]]; then
+ if [[ $# -eq 0 ]]; then
printf "Usage: %s [-h] COMMAND [ARGUMENTS]\n" "${0##*/}"
echo "Tool for working with the nonfree software blacklist"
echo
@@ -128,7 +128,7 @@ if [[ "${0##*/}" == libreblacklist ]]; then
fi
}
- if [[ $# == 0 ]]; then
+ if [[ $# -eq 0 ]]; then
usage >/dev/stderr
exit 1
fi