fix directory

This commit is contained in:
Antonio J. Delgado 2025-02-21 08:17:12 +02:00
parent 0c2f1d0e2e
commit 6b1463a0c6

View file

@ -1,4 +1,11 @@
#!/bin/bash
download_dir="$(grep download_dir "${CONFIG_FILE}" | awk 'BEGIN {FS="="} {print($2)}' | sed 's/"//g')"
if [ "${download_dir}" == "" ]; then
download_dir="${HOME}/downloaded_youtube_videos"
fi
cd "${download_dir}" || exit 1
chmod 0777 "${download_dir}" -R
chown glances:ssl-cert "${download_dir}" -R
if [ -r "${HOME}/.config/youtube_channels_folders.json" ]; then
while read -r video_id
do