From f501c081df0fa6b21fdf77327003b3fc5765d6ad Mon Sep 17 00:00:00 2001 From: fabian Date: Sat, 27 May 2023 18:12:05 +0200 Subject: [PATCH] better output dir naming --- scripts/reencode_audio.sh | 3 ++- scripts/reencode_m4a.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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