Commit 41724a3d authored by nimrod's avatar nimrod
Browse files

Moved bfg function to shell script, download bfg jar to ~/Documents/bin instead of ~/Downloads.

parent 13469b93
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -191,11 +191,6 @@ __sync_comics () {
    find "$HOME/Downloads/Comics/" -name "$(date --date '2 month ago' +'0-Day\ Week\ of\ %Y.%m.*')" -exec rm -r {} +
}

bfg () {
    [ -f "$HOME/Downloads/bfg.jar" ] || curl 'https://search.maven.org/remote_content?g=com.madgag&a=bfg&v=LATEST' -sLo "$HOME/Downloads/bfg.jar"
    java -jar "$HOME/Downloads/bfg.jar" "$@"
}

ddg () {
    lynx "https://duckduckgo.com/lite/?q=$(urlencode "$@")"
}

Documents/bin/bfg

0 → 100755
+6 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eu

__BFG_JAR="$HOME/Documents/bin/bfg.jar"
[ -f "$__BFG_JAR" ] || curl 'https://search.maven.org/remote_content?g=com.madgag&a=bfg&v=LATEST' -sLO "$__BFG_JAR"
exec java -jar "$__BFG_JAR" "$@"