summaryrefslogtreecommitdiff
path: root/src/loadclass.sh
diff options
context:
space:
mode:
authorFred Ar <ar.fred@yahoo.com>2010-07-07 07:47:57 -0700
committerSage Weil <sage@newdream.net>2010-07-07 07:47:57 -0700
commit6cca139f0a9f7b68a12f0384d48543e7c20528e6 (patch)
tree4f7317a912fd19fd52f44db4bd11ffa698cc7756 /src/loadclass.sh
parent9432a9588972860aa2fdb3f9ea18eb88073ace9a (diff)
downloadceph-6cca139f0a9f7b68a12f0384d48543e7c20528e6.tar.gz
shell script fixes
Diffstat (limited to 'src/loadclass.sh')
-rwxr-xr-xsrc/loadclass.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/loadclass.sh b/src/loadclass.sh
index f8a7b49711b..cbad73b7a16 100755
--- a/src/loadclass.sh
+++ b/src/loadclass.sh
@@ -1,15 +1,15 @@
#!/bin/bash
fname=$1
-[ "$fname" == "" ] && exit
+[ -z "$fname" ] && exit
[ -e $fname ] || { echo "file no found: $fname"; exit; }
name="`nm $fname | grep __cls_name__ | sed 's/.*__cls_name__//g' | head -1`"
-[ "$name" == "" ] && exit
+[ -z "$name" ] && exit
ver="`nm $fname | grep __cls_ver__ | sed 's/.*__cls_ver__//g' | sed 's/_/\./g' | head -1`"
-[ "$ver" == "" ] && exit
+[ -z "$ver" ] && exit
echo loading $name v$ver
fl=`file $fname`
@@ -19,7 +19,7 @@ arch=""
[ `echo "$fl" | grep -c i386` -gt 0 ] && arch="i386"
[ `echo "$fl" | grep -c x86-64` -gt 0 ] && arch="x86-64"
-[ "$arch" == "" ] && { echo "lib architecture not identified"; exit; }
+[ -z "$arch" ] && { echo "lib architecture not identified"; exit; }
`dirname $0`/ceph class add $name $ver $arch --in-data=$fname