From be29eb5f23294cd56ac9491099fc74beb4213ccd Mon Sep 17 00:00:00 2001 From: Lionel Date: Mon, 5 Nov 2018 14:36:26 +0100 Subject: Corrected some errors in my code --- randopitons.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to ':') diff --git a/randopitons.sh b/randopitons.sh index fdc7f5e..785f475 100644 --- a/randopitons.sh +++ b/randopitons.sh @@ -23,14 +23,16 @@ _download() { while read linefromfile; do - mkdir "${linefromfile}" - cd "${linefromfile}" + mkdir -p ${__dir}/randopfiles/"${linefromfile}" + cd ${__dir}/randopfiles/"${linefromfile}" WEBREGION=$(echo ${linefromfile} | sed 's/ de /\-/g' | tr '[:upper:]' '[:lower:]') FILENBRS=$(wget -qO- https://randopitons.re/randonnees/region/${WEBREGION} | grep " /tmp/regionshash.txt if [ -s $REGIONFILE ];then echo "Region file is already there. OK" -elif [ "$_CURRENTREGIONMD5" != "$_ORIGREGIONMD5" ] +elif [ "$_CURRENTREGIONMD5" != "$_ORIGREGIONMD5" ];then _crearegfile else _crearegfile @@ -146,7 +148,7 @@ while [ "$1" != "" ]; do -em | --elevator-music ) echo "Initiating elevator music" - mpv --no-audio --really-quiet "https://www.youtube.com/watch?v=KfNXGY9O5VY" & || echo -e "\nmpv is not installed." + mpv --no-audio --really-quiet https://www.youtube.com/watch?v=KfNXGY9O5VY || echo -e "\nmpv is not installed." ;; -h | --help ) -- cgit v1.2.3-70-g09d2