aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/session.sh
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2010-08-21 12:02:11 -0400
committerGravatar Ben Boeckel <MathStuf@gmail.com>2010-10-02 11:56:29 -0400
commite0e443e5c5bbd7663542788401d0e44da91e301e (patch)
treee74e930ddac1eece035d9a9d2aa08d9fe28c9b97 /examples/data/scripts/session.sh
parenta2901d469cacd317e8995486401f363bc569d37c (diff)
Use -z and -n tests rather than "x$foo" = "x" hack
Diffstat (limited to 'examples/data/scripts/session.sh')
-rwxr-xr-xexamples/data/scripts/session.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/data/scripts/session.sh b/examples/data/scripts/session.sh
index d30f3da..3f1c6d3 100755
--- a/examples/data/scripts/session.sh
+++ b/examples/data/scripts/session.sh
@@ -19,7 +19,7 @@ UZBL="uzbl-browser -c $UZBL_CONFIG_FILE" # add custom flags and whatever here.
act="$1"
# Test if we were run alone or from uzbl
-if [ "x$UZBL_FIFO" = "x" ]; then
+if [ -z "$UZBL_FIFO" ]; then
# Take the old config
act="$UZBL_CONFIG"
fi
@@ -27,7 +27,7 @@ fi
case $act in
"launch" )
urls=$(cat $UZBL_SESSION_FILE)
- if [ "x$urls" = "x" ]; then
+ if [ -z "$urls" ]; then
$UZBL
else
for url in $urls; do
@@ -39,7 +39,7 @@ case $act in
;;
"endinstance" )
- if [ "x$UZBL_FIFO" = "x" ]; then
+ if [ -z "$UZBL_FIFO" ]; then
echo "session manager: endinstance must be called from uzbl"
exit 1
fi