summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-22 12:12:29 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-22 12:12:29 -0600
commit75d2804167d3a7cfb5ec6cce6cd8cb8b57f8a82f (patch)
tree5f4ad55078c5c9bec13a63629ffd6aa6ff782ca2
parent48819c69c2404f3edb203ab08401dac0f776fb78 (diff)
'>'/'<' do lexicographic comparison, we want integerv0.5.1
-rw-r--r--jh-checksource.sh4
-rw-r--r--jh-list-commands.sh2
-rw-r--r--jh-mvn-install.sh2
-rw-r--r--jh-mvn-localrepo.sh2
-rw-r--r--jh.sh.in2
5 files changed, 6 insertions, 6 deletions
diff --git a/jh-checksource.sh b/jh-checksource.sh
index 23c3ada..518f172 100644
--- a/jh-checksource.sh
+++ b/jh-checksource.sh
@@ -68,7 +68,7 @@ main() {
# Heavy lifting
find . -type f -printf '%s %h/%f\n' | # find all files
while read -r size file; do # filter out files smaller than $min_size
- [[ $size < $min_size ]] || printf '%s\n' "$file"
+ [[ $size -lt $min_size ]] || printf '%s\n' "$file"
done |
xargs -d'\n' file --mime-type -r -F "$sep" | # identify the filetypes
sed -r "s@(.*)${sep}\s*(.*)@\2:\1@" | # reformat the output to be easier to parse
@@ -86,7 +86,7 @@ main() {
fi
done > "$unsafe_files"
- if [[ "$(stat -c '%s' -- "$unsafe_files")" > 0 ]]; then
+ if [[ "$(stat -c '%s' -- "$unsafe_files")" -gt 0 ]]; then
<"$unsafe_files" sort | print-$format
exit 1
fi
diff --git a/jh-list-commands.sh b/jh-list-commands.sh
index a099fae..164d6b2 100644
--- a/jh-list-commands.sh
+++ b/jh-list-commands.sh
@@ -4,7 +4,7 @@
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See the COPYING file for more details.
-if [[ $# > 0 ]]; then
+if [[ $# -gt 0 ]]; then
jh-help $0 >>/dev/stderr
exit 1
fi
diff --git a/jh-mvn-install.sh b/jh-mvn-install.sh
index 0fabd71..a3aae55 100644
--- a/jh-mvn-install.sh
+++ b/jh-mvn-install.sh
@@ -4,7 +4,7 @@
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See the COPYING file for more details.
-if [[ $# < 4 ]]; then
+if [[ $# -lt 4 ]]; then
jh-help $0 >>/dev/stderr
exit 1
fi
diff --git a/jh-mvn-localrepo.sh b/jh-mvn-localrepo.sh
index b01ed93..fd6323f 100644
--- a/jh-mvn-localrepo.sh
+++ b/jh-mvn-localrepo.sh
@@ -4,7 +4,7 @@
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See the COPYING file for more details.
-if [[ $# > 0 ]]; then
+if [[ $# -gt 0 ]]; then
jh-help $0 >>/dev/stderr
exit 1
fi
diff --git a/jh.sh.in b/jh.sh.in
index 0d0b9f6..d946da7 100644
--- a/jh.sh.in
+++ b/jh.sh.in
@@ -14,7 +14,7 @@ if [[ -z $jh_short ]]; then
fi
main() {
- if [[ $# < 1 ]]; then
+ if [[ $# -lt 1 ]]; then
jh-help >>/dev/stderr
return 1;
fi