dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit f2e2653181588d92b0e25e3b2e633bb33b888269
parent 17f672d68914d6cb86fddb427aae4a64984801ee
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 10 Apr 2019 09:48:54 +0200

Improve shdl script

Diffstat:
Mbin/shdl | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/shdl b/bin/shdl @@ -10,11 +10,11 @@ else fi shdl_fetch() { - url=$($prefix curl --connect-timeout 30 --max-time 60 --silent \ - http://sci-hub.tw/"$@" | \ + url="$($prefix curl --connect-timeout 30 --max-time 60 --silent \ + "http://sci-hub.tw/$*" | \ grep location.href | \ - grep -o \/\/.*pdf | sed 's/^/http:/') - echo $url + grep -o '//.*pdf' | sed 's/^/http:/')" + echo "$url" $prefix curl --connect-timeout 30 --max-time 60 -O "$url" }