littlejeem / control_scripts

A collection of scripts that control functions, primarily on my media pc
GNU General Public License v3.0
0 stars 0 forks source link

abcde_alac.conf - find way to remove hard coded user #4

Open littlejeem opened 3 years ago

littlejeem commented 3 years ago

.conf file includes the following lines:

post_encode ()
{
ARTISTFILE="$(mungefilename "$TRACKARTIST")"
ALBUMFILE="$(mungefilename "$DALBUM")"
GENRE="$(mungegenre "$GENRE")"
YEAR=${CDYEAR:-$CDYEAR}

if [ "$VARIOUSARTISTS" = "y" ] ; then
FINDPATH="$(eval echo "$VAOUTPUTFORMAT")"
else
FINDPATH="$(eval echo "$OUTPUTFORMAT")"
fi

FINALDIR="$(dirname "$OUTPUTDIR")"
FINALDIR1="$(dirname "$OUTPUTDIR")"
C_CMD=(chown -R jlivin25:jlivin25 "$FINALDIR")
C_CMD1=(chmod -R 777 "$FINALDIR")
#echo "${C_CMD[@]}" >> tmp2.log
"${C_CMD[@]}"
"${C_CMD1[@]}"
cd "$FINALDIR"

if [ "$OUTPUTTYPE" = "flac" ] ; then
vecho "Preparing to embed the album art..." >&2
else
vecho "Not embedding album art, you need flac output.." >&2
return 1
fi
}

The line here...

C_CMD=(chown -R jlivin25:jlivin25 "$FINALDIR")

...need to find a way to 'pull' variable through from install or some other means