diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2020-03-30 17:32:36 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2020-03-30 17:32:36 +0200 |
commit | bac5c5170cd48d913dc08cd64e8dd01046487e51 (patch) | |
tree | 2c5794adc2de57273860525ea9d91d4d00a0e742 | |
parent | 1d5bd1d959189cf98700eaa8027d6e4dd01a164d (diff) | |
download | scripts-bac5c5170cd48d913dc08cd64e8dd01046487e51.tar.gz scripts-bac5c5170cd48d913dc08cd64e8dd01046487e51.zip |
showURLimage.sh now downloads to its own folder.
-rwxr-xr-x | showURLimage.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/showURLimage.sh b/showURLimage.sh index cd7db1f..0650f0c 100755 --- a/showURLimage.sh +++ b/showURLimage.sh @@ -7,8 +7,10 @@ url="$1" echo "$url" | grep -i "youtube" >/dev/null && url="$(youtube-dl --get-thumbnail "$url")" -filename="/tmp/showURLimage$(date +%H%M%S)" +folder="/tmp/showURLimage" +filename="${folder}/$(date +%H%M%S)" +[ -d "$folder" ] || mkdir -p "$folder" curl "$url" > "$filename" sxiv -b -N "sxivfloat" "$filename" || notify-send "No image found at $url" |