aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-12-30 18:21:14 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2010-12-30 18:21:14 -0700
commit5b78756e9a395f79db4416ac1b93f440153acefd (patch)
tree404409f04dfa7c1e6abe078ce2ac796d65f0e60e
parent71dfda767ab2e9bfa2be2f77f1619edf52cc09a4 (diff)
remove positional argument support from examples
-rwxr-xr-xexamples/data/scripts/download.sh1
-rwxr-xr-xexamples/data/scripts/follow.sh2
-rwxr-xr-xexamples/data/scripts/formfiller.sh2
-rwxr-xr-xexamples/data/scripts/load_cookies.sh4
-rwxr-xr-xexamples/data/scripts/per-site-settings.py2
-rwxr-xr-xexamples/data/scripts/session.sh6
6 files changed, 3 insertions, 14 deletions
diff --git a/examples/data/scripts/download.sh b/examples/data/scripts/download.sh
index df7a571..c410ad2 100755
--- a/examples/data/scripts/download.sh
+++ b/examples/data/scripts/download.sh
@@ -6,7 +6,6 @@
# that path.
# if nothing is printed to stdout, the download will be cancelled.
-shift 7
. $UZBL_UTIL_DIR/uzbl-dir.sh
# the URL that is being downloaded
diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh
index 2d666a2..d1560bf 100755
--- a/examples/data/scripts/follow.sh
+++ b/examples/data/scripts/follow.sh
@@ -3,8 +3,6 @@
# This script is just a wrapper around follow.js that lets us change uzbl's mode
# after a link is selected.
-shift 7
-
# if socat is installed then we can change Uzbl's input mode once a link is
# selected; otherwise we just select a link.
if ! which socat >/dev/null 2>&1; then
diff --git a/examples/data/scripts/formfiller.sh b/examples/data/scripts/formfiller.sh
index 6e04573..c6822e6 100755
--- a/examples/data/scripts/formfiller.sh
+++ b/examples/data/scripts/formfiller.sh
@@ -53,8 +53,6 @@ MODELINE="> vim:ft=formfiller"
[ -d "$(dirname $UZBL_FORMS_DIR)" ] || exit 1
[ -d $UZBL_FORMS_DIR ] || mkdir $UZBL_FORMS_DIR || exit 1
-shift 7
-
action=$1
domain=$(echo $UZBL_URI | sed 's/\(http\|https\):\/\/\([^\/]\+\)\/.*/\2/')
diff --git a/examples/data/scripts/load_cookies.sh b/examples/data/scripts/load_cookies.sh
index f4c6886..17ec2ad 100755
--- a/examples/data/scripts/load_cookies.sh
+++ b/examples/data/scripts/load_cookies.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-if [ "$8" != "" ]; then
- cookie_file=$8
+if [ "$1" != "" ]; then
+ cookie_file=$1
else
cookie_file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/cookies.txt
fi
diff --git a/examples/data/scripts/per-site-settings.py b/examples/data/scripts/per-site-settings.py
index febfd0f..89df4e6 100755
--- a/examples/data/scripts/per-site-settings.py
+++ b/examples/data/scripts/per-site-settings.py
@@ -100,7 +100,7 @@ def write_to_socket(commands, sockpath):
if __name__ == '__main__':
sockpath = os.environ['UZBL_SOCKET']
url = urlparse.urlparse(os.environ['UZBL_URI'])
- filepath = sys.argv[8]
+ filepath = sys.argv[1]
mode = os.stat(filepath)[stat.ST_MODE]
diff --git a/examples/data/scripts/session.sh b/examples/data/scripts/session.sh
index 36e0c19..ee09cf2 100755
--- a/examples/data/scripts/session.sh
+++ b/examples/data/scripts/session.sh
@@ -30,12 +30,6 @@ fi
UZBL="uzbl-browser -c $UZBL_CONFIG_FILE" # add custom flags and whatever here.
-if [ $# -gt 1 ]; then
- # this script is being run from uzbl, rather than standalone
- # discard the uzbl arguments
- shift 7
-fi
-
scriptfile=$(readlink -f $0) # this script
act="$1"