ImageDownloader/openbrowser.sh
2016-03-28 15:05:40 +02:00

11 lines
268 B
Bash
Executable File

#!/bin/bash
URL=$1
BROWSER=firefox
JAVA=/usr/lib/jvm/java-8-openjdk/bin/java
IMAGE_DOWNLOADER=/home/daniel/Projects/ImageDownloader/target/ImageDownloader-0.1.jar
if [ ${URL: -97:1} == "#" ]; then
$JAVA -jar $IMAGE_DOWNLOADER $URL | feh -. -
else
$BROWSER $URL
fi