Use paths relative to executable + other stuff
This commit is contained in:
parent
9f5aa68505
commit
8be86e51f2
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
downloads/*
|
downloads/
|
||||||
yt-dlc/
|
yt-dlc/
|
||||||
|
@ -4,10 +4,10 @@ Effortlessly download South Park episodes from southpark.de in bulk
|
|||||||
## Setup
|
## Setup
|
||||||
`git clone https://github.com/xypwn/southpark-de-downloader.git; cd southpark-de-downloader`
|
`git clone https://github.com/xypwn/southpark-de-downloader.git; cd southpark-de-downloader`
|
||||||
|
|
||||||
`sh init.sh` this will download youtube-dlc and apply a patch for english episodes.
|
`./init.sh` this will download youtube-dlc and apply a patch for english episodes.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
`sh southpark-downloader.sh -h` to show usage instructions
|
`./southpark-downloader.sh -h` to show usage instructions
|
||||||
|
|
||||||
All downloads will end up in the `downloads` folder in the cloned repo (you can also change it in config.sh, if you want to).
|
All downloads will end up in the `downloads` folder in the cloned repo (you can also change it in config.sh, if you want to).
|
||||||
|
|
||||||
@ -16,4 +16,4 @@ All downloads will end up in the `downloads` folder in the cloned repo (you can
|
|||||||
|
|
||||||
`./southpark-downloader.sh -s 5 -e 13` download Season 5 Episode 13
|
`./southpark-downloader.sh -s 5 -e 13` download Season 5 Episode 13
|
||||||
|
|
||||||
`./southpark-downloader.sh -D -s 1` download Season 2 in German
|
`./southpark-downloader.sh -D -s 2` download Season 2 in German
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
source ./config.sh
|
source "$(dirname $0)/config.sh"
|
||||||
|
|
||||||
YOUTUBE_DL="$PWD/$YOUTUBE_DL"
|
# We need absolute paths, since we'll be changing directories later
|
||||||
OUTDIR="$PWD/$SAVEDIR"
|
YOUTUBE_DL="$(readlink -f $(dirname $0))/$YOUTUBE_DL"
|
||||||
|
OUTDIR="$(readlink -f $(dirname $0))/$SAVEDIR"
|
||||||
|
|
||||||
p_info() {
|
p_info() {
|
||||||
echo -e "\e[32m>>> $@\e[m"
|
echo -e "\e[32m>>> $@\e[m"
|
||||||
@ -159,7 +160,7 @@ download_all() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
[ ! -e "$OUTDIR" ] && mkdir "$OUTDIR"
|
[ ! -e "$OUTDIR" ] && mkdir -p "$OUTDIR"
|
||||||
|
|
||||||
if [ -n "$OPT_SEASON" ]; then
|
if [ -n "$OPT_SEASON" ]; then
|
||||||
get_season_url "$OPT_SEASON"
|
get_season_url "$OPT_SEASON"
|
||||||
|
Loading…
Reference in New Issue
Block a user