diff --git a/scripts/reencode_audio.sh b/scripts/reencode_audio.sh index 70e1fbd..814eb43 100755 --- a/scripts/reencode_audio.sh +++ b/scripts/reencode_audio.sh @@ -2,7 +2,8 @@ set -euo pipefail # ensure existence of destination folder -dest=../reencode +dir="$(pwd)" +dest=${dir%/*}/${dir##*/}_reencode if [[ !(-d $dest) ]]; then mkdir $dest fi diff --git a/scripts/reencode_m4a.sh b/scripts/reencode_m4a.sh index a12029b..9a160ba 100755 --- a/scripts/reencode_m4a.sh +++ b/scripts/reencode_m4a.sh @@ -18,7 +18,8 @@ if [[ -z $vbr ]]; then fi # ensure existence of destination folder -dest=../reencode +dir="$(pwd)" +dest=${dir%/*}/${dir##*/}_reencode if [[ !(-d $dest) ]]; then mkdir $dest fi