diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2010-08-21 11:40:45 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2010-10-02 11:56:29 -0400 |
commit | 391ffa73dfa46beea7dff2c9789a5f56a39227c4 (patch) | |
tree | bbec771947eeea41a12a630f77179fc2d063d7d4 /examples/data/scripts/download.sh | |
parent | 6c53e3e93b449c5501ef9d046244a71eb36db074 (diff) |
Migrate to using uzbl-dir util script
Diffstat (limited to 'examples/data/scripts/download.sh')
-rwxr-xr-x | examples/data/scripts/download.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/data/scripts/download.sh b/examples/data/scripts/download.sh index 0f051db..5b4baa7 100755 --- a/examples/data/scripts/download.sh +++ b/examples/data/scripts/download.sh @@ -2,10 +2,11 @@ # just an example of how you could handle your downloads # try some pattern matching on the uri to determine what we should do +source $UZBL_UTIL_DIR/uzbl-dir.sh + # Some sites block the default wget --user-agent.. -GET="wget --user-agent=Firefox --content-disposition --load-cookies=$XDG_DATA_HOME/uzbl/cookies.txt" +GET="wget --user-agent=Firefox --content-disposition --load-cookies=$UZBL_COOKIE_JAR" -dest="$HOME" url="$8" http_proxy="$9" @@ -15,7 +16,7 @@ test "x$url" = "x" && { echo "you must supply a url! ($url)"; exit 1; } # only changes the dir for the $get sub process if echo "$url" | grep -E '.*\.torrent' >/dev/null; then - ( cd "$dest"; $GET "$url") + ( cd "$UZBL_DOWNLOAD_DIR"; $GET "$url") else - ( cd "$dest"; $GET "$url") + ( cd "$UZBL_DOWNLOAD_DIR"; $GET "$url") fi |