aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/session.sh
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2011-03-13 21:49:27 -0600
committerGravatar Brendan Taylor <whateley@gmail.com>2011-03-13 21:49:27 -0600
commit32f6f8360684c0b583e613cf5727f0c102438bd2 (patch)
treef36a5441ca4c075687649740a0143bddee189be1 /examples/data/scripts/session.sh
parent5ec505fdb007d22bcfb5631e88e67038b06d778a (diff)
sh scripts: replace print with echo/printf
we can safely use echo in many of the situations where 'print' is being used, and we can use printf directly in other places.
Diffstat (limited to 'examples/data/scripts/session.sh')
-rwxr-xr-xexamples/data/scripts/session.sh21
1 files changed, 10 insertions, 11 deletions
diff --git a/examples/data/scripts/session.sh b/examples/data/scripts/session.sh
index d03554b..4e7bfd1 100755
--- a/examples/data/scripts/session.sh
+++ b/examples/data/scripts/session.sh
@@ -26,7 +26,6 @@ if [ -z "$UZBL_UTIL_DIR" ]; then
fi
. "$UZBL_UTIL_DIR/uzbl-dir.sh"
-. "$UZBL_UTIL_DIR/uzbl-util.sh"
[ -d "$UZBL_DATA_DIR" ] || exit 1
@@ -55,27 +54,27 @@ case $act in
"endinstance")
if [ -z "$UZBL_FIFO" ]; then
- print "session manager: endinstance must be called from uzbl\n"
+ echo "session manager: endinstance must be called from uzbl"
exit 1
fi
- [ "$UZBL_URI" != "(null)" ] && print "$UZBL_URI\n" >> "$UZBL_SESSION_FILE"
- print "exit\n" > "$UZBL_FIFO"
+ [ "$UZBL_URI" != "(null)" ] && echo "$UZBL_URI" >> "$UZBL_SESSION_FILE"
+ echo "exit" > "$UZBL_FIFO"
;;
"endsession")
for fifo in "$UZBL_FIFO_DIR/uzbl_fifo_*"; do
if [ "$fifo" != "$UZBL_FIFO" ]; then
- print "spawn $scriptfile endinstance\n" > "$fifo"
+ echo "spawn $scriptfile endinstance" > "$fifo"
fi
done
- [ -z "$UZBL_FIFO" ] || print "spawn $scriptfile endinstance\n" > "$UZBL_FIFO"
+ [ -z "$UZBL_FIFO" ] || echo "spawn $scriptfile endinstance" > "$UZBL_FIFO"
;;
*)
- print "session manager: bad action\n"
- print "Usage: $scriptfile [COMMAND] where commands are:\n"
- print " launch - Restore a saved session or start a new one\n"
- print " endinstance - Quit the current instance. Must be called from uzbl\n"
- print " endsession - Quit the running session.\n"
+ echo "session manager: bad action"
+ echo "Usage: $scriptfile [COMMAND] where commands are:"
+ echo " launch - Restore a saved session or start a new one"
+ echo " endinstance - Quit the current instance. Must be called from uzbl"
+ echo " endsession - Quit the running session."
;;
esac