fixed typo, correct error code on exit

This commit is contained in:
Alexander Bocken 2021-01-03 19:24:58 +01:00
parent 79dc5a1adb
commit 553bdff07d
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
DESTDIR="/usr/local/bin" DESTDIR="$HOME/.local/bin"
XDG_VIDEOS_DIR=$HOME/vids #TODO ADJUST FOR PERSONAL USE HERE! XDG_VIDEOS_DIR=$HOME/vids #TODO ADJUST FOR PERSONAL USE HERE!
DLARCHIVE="${XDG_VIDEOS_DIR:-$HOME/Videos}/.downloaded" DLARCHIVE="${XDG_VIDEOS_DIR:-$HOME/Videos}/.downloaded"
DLLOC="${XDG_VIDEOS_DIR:-$HOME/Videos}" DLLOC="${XDG_VIDEOS_DIR:-$HOME/Videos}"
@ -8,10 +8,10 @@ BLACKLIST="${XDG_VIDEOS_DIR:-$HOME/Videos}/.blacklist"
install(){ install(){
mkdir -p "$DLLOC" "$(dirname "$CHANNELSFILE")" "$(dirname "$DLARCHIVE")" "$(dirname "$BLACKLIST")" "$DESTDIR" mkdir -p "$DLLOC" "$(dirname "$CHANNELSFILE")" "$(dirname "$DLARCHIVE")" "$(dirname "$BLACKLIST")" "$DESTDIR"
cp ripper "$DESTDIR/ripper" cp -f ripper "$DESTDIR/ripper"
[ ! -f "$CHANNELSFILE" ] && printf '#Add channels to add in this file\n#Format: https://www.youtube.com/channel/<channelId>' > "$CHANNELSFILE" [ -f "$CHANNELSFILE" ] || printf '#Add channels in this file\n#Format: https://www.youtube.com/channel/<channelId>' > "$CHANNELSFILE"
[ ! -f "$BLACKLIST" ] && printf '#Add video URIs here (not just the IDs)' > "$BLACKLIST" [ -f "$BLACKLIST" ] || printf '#Add video URIs here (not just the IDs)' > "$BLACKLIST"
[ ! -f "$DLARCHIVE" ] && printf '#These videos will not be attempted to download again' > "$DLARCHIVE" [ -f "$DLARCHIVE" ] || printf '#These videos will not be attempted to download again' > "$DLARCHIVE"
} }
uninstall(){ uninstall(){