Fix absolute paths
This commit is contained in:
parent
8be86e51f2
commit
b006238127
@ -6,4 +6,4 @@
|
|||||||
YOUTUBE_DL="./yt-dlc/youtube-dlc"
|
YOUTUBE_DL="./yt-dlc/youtube-dlc"
|
||||||
|
|
||||||
# Where the downloaded videos will get stored
|
# Where the downloaded videos will get stored
|
||||||
SAVEDIR="./downloads"
|
OUTDIR="./downloads"
|
||||||
|
@ -2,9 +2,13 @@
|
|||||||
|
|
||||||
source "$(dirname $0)/config.sh"
|
source "$(dirname $0)/config.sh"
|
||||||
|
|
||||||
# We need absolute paths, since we'll be changing directories later
|
[ ! -e "$(dirname $0)/$OUTDIR" ] && mkdir -p "$(dirname $0)/$OUTDIR"
|
||||||
YOUTUBE_DL="$(readlink -f $(dirname $0))/$YOUTUBE_DL"
|
|
||||||
OUTDIR="$(readlink -f $(dirname $0))/$SAVEDIR"
|
# Turn paths into absolute ones, if they aren't already, as we will change directories later
|
||||||
|
[ ! "${SAVEDIR::1}" = "/" ] &&
|
||||||
|
OUTDIR="$(readlink -f $(dirname $0)/$OUTDIR)"
|
||||||
|
[ ! "${YOUTUBE_DL::1}" = "/" ] &&
|
||||||
|
YOUTUBE_DL="$(readlink -f $(dirname $0)/$YOUTUBE_DL)"
|
||||||
|
|
||||||
p_info() {
|
p_info() {
|
||||||
echo -e "\e[32m>>> $@\e[m"
|
echo -e "\e[32m>>> $@\e[m"
|
||||||
@ -160,8 +164,6 @@ download_all() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
[ ! -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"
|
||||||
[ -z "$RES" ] &&
|
[ -z "$RES" ] &&
|
||||||
|
Loading…
Reference in New Issue
Block a user