dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d6b4fd8bbf667711d4f51b6589cf9eb2e0dd8724
parent ccfe0f2018b240df79ce441885114e3f61b48950
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Fri, 10 Aug 2018 11:42:55 -0400

Merge pull request #101 from The-King-of-Toasters/master

Change sci-hub command to use 1 perl-style grep
Diffstat:
M.scripts/linkhandler | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.scripts/linkhandler b/.scripts/linkhandler @@ -31,7 +31,7 @@ elif echo $wgetFiles | grep -w $ext > /dev/null; then elif echo "$@" | grep "$vidsites">/dev/null; then setsid nohup mpv -quiet "$1" > /dev/null & disown elif echo "$@" | grep "$academic">/dev/null; then - curl -sO $(curl -s "$scihub""$@" | grep location.href | grep -o http.*pdf) & disown + curl -sO "$(curl -s "$scihub$*" | grep -Po "(?<=location.href=').+.pdf")" & disown else setsid nohup $BROWSER "$1" 2>/dev/null & disown fi