diff options
author | keis <keijser@gmail.com> | 2010-12-17 23:42:02 +0100 |
---|---|---|
committer | keis <keijser@gmail.com> | 2010-12-18 23:37:33 +0100 |
commit | a24bd9a761773aad6a9512da5c3524f07c32d689 (patch) | |
tree | 26c48f893e88477481e981be09bb9c4922b7d463 | |
parent | c294dc43176f384a7a7c2a3be25eebefb3698315 (diff) |
use sync_spawn_exec to load cookies
-rw-r--r-- | examples/config/config | 2 | ||||
-rwxr-xr-x | examples/data/scripts/load_cookies.sh | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/examples/config/config b/examples/config/config index 29f5fbc..caf68a1 100644 --- a/examples/config/config +++ b/examples/config/config @@ -395,7 +395,7 @@ set stack = @mode_config stack set default_mode = command # === Post-load misc commands ================================================ -sync_spawn @scripts_dir/load_cookies.sh +sync_spawn_exec @scripts_dir/load_cookies.sh # Set the "home" page. set uri = uzbl.org/doesitwork/@COMMIT diff --git a/examples/data/scripts/load_cookies.sh b/examples/data/scripts/load_cookies.sh index a192d3b..f4c6886 100755 --- a/examples/data/scripts/load_cookies.sh +++ b/examples/data/scripts/load_cookies.sh @@ -1,13 +1,11 @@ #!/bin/sh -if [ "$1" != "" ]; then - cookie_file=$1 +if [ "$8" != "" ]; then + cookie_file=$8 else cookie_file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/cookies.txt fi -echo $cookie_file - awk -F \\t ' BEGIN { scheme["TRUE"] = "https"; @@ -19,4 +17,4 @@ printf("add_cookie \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", substr($1,lengt $0 !~ /^#/ { printf("add_cookie \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", $1, $3, $6, $7, scheme[$4], $5) } -' $cookie_file > $UZBL_FIFO +' $cookie_file |