]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
change: Parameter to long names
authorBastian Dehn <hhaalo@arcor.de>
Tue, 17 Jan 2017 19:40:35 +0000 (20:40 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 17 Jan 2017 20:19:09 +0000 (21:19 +0100)
Parameter long names is better to read

albentohandy.sh
flactomp3v2.sh

index 48de46e9d0171359c1e20e66e334531fa9342242..245a031c1672f961fa9691810c27e5166102a8a5 100755 (executable)
@@ -43,7 +43,7 @@ cptodest=false
 # read more about basefile in man parallel
 if [ -f $HOME/.flactomp3v2.conf ]
 then
-       BASEFILE="--bf $HOME/.flactomp3v2.conf --cleanup"
+       BASEFILE="--basefile $HOME/.flactomp3v2.conf --cleanup"
 fi
 
 # read parameters
@@ -102,7 +102,7 @@ addInfo "<p>$(cat "$albumlist" | sed 's/$/<br>/')</p>"
 printf "\nPhase %02d of %02d: create symlinks of flac's to working directory %s\n" $((curphase++)) $phase "$work"
 for i in $(cat "$albumlist")
 do
-       cp -rs $musicpath/$i $work/
+       cp --recursive --symbolic-link $musicpath/$i $work/
 done
 
 addInfo "<p>"
@@ -111,7 +111,7 @@ addInfo "flac -&gt; mp3 start<br>"
 # convert flac to mp3
 # it is the longest phase
 printf "\nPhase %02d of %02d: flac -> mp3\n" $((curphase++)) $phase
-find $work -name '*.flac' | sort | parallel $BASEFILE --eta --progress --noswap -S $parallelopts $scriptpath/flactomp3v2.sh {}
+find $work -name '*.flac' | sort | parallel $BASEFILE --eta --progress --noswap --sshlogin $parallelopts $scriptpath/flactomp3v2.sh {}
 currentDate
 addInfo "flac -&gt; mp3 finished</p>"
 
@@ -162,7 +162,7 @@ then
        addInfo "copy from $work to $dest start<br>"
        if [ ! -d $dest ]
        then
-               mkdir -p $dest
+               mkdir --parents $dest
        fi
        cp -r $work/* $dest
        currentDate
@@ -173,7 +173,7 @@ fi
 if ( [ $mkzip == true ] || [ $cptodest == true ] ) && [ $removework == true ]
 then
        printf "cleanup working directory\n\n"
-       rm -r $work
+       rm --recursive $work
 fi
 
 addInfo "<p>"
index 9561e22acab9c063000a25353119cbfafe622951..f16c721c005cee10dd5ae248a0812beb338799eb 100755 (executable)
@@ -28,9 +28,9 @@ RAG=$(metaflac "$INPUTFILE" --show-tag=REPLAYGAIN_ALBUM_GAIN | sed s/.*=//g)
 RAP=$(metaflac "$INPUTFILE" --show-tag=REPLAYGAIN_ALBUM_PEAK | sed s/.*=//g)
 
 # ID3v2.3 tagging with cover and without cover
-eyed3Command="eyeD3 -2 --to-v2.3 \
--a \"$ARTIST\" -t \"$TITLE\" -A \"$ALBUM\" -G \"${GENRE:-12}\" \
--n \"${TRACKNUMBER:-0}\" -Y \"$DATE\" \
+eyed3Command="eyeD3 --v2 --to-v2.3 \
+--artist=\"$ARTIST\" --title=\"$TITLE\" --album=\"$ALBUM\" --genre=\"${GENRE:-12}\" \
+--track=\"${TRACKNUMBER:-0}\" --year=\"$DATE\" \
 --set-user-text-frame=\"REPLAYGAIN_REFERENCE_LOUDNESS:$RRL\" \
 --set-user-text-frame=\"REPLAYGAIN_TRACK_GAIN:$RTG\" \
 --set-user-text-frame=\"REPLAYGAIN_TRACK_PEAK:$RTP\" \
@@ -44,7 +44,7 @@ eyed3Command+=" --no-tagging-time-frame \
 \"$OUTPUTFILE\" > /dev/null 2>&1"
 
 # stream flac into the lame encoder
-nice -n2 flac -s -c -d "$INPUTFILE" | nice -n3 lame --silent -b $BITRATE -m $MODE --noreplaygain - "$OUTPUTFILE"
+nice --adjustment=2 flac --silent --stdout --decode "$INPUTFILE" | nice --adjustment=3 lame --silent -b $BITRATE -m $MODE --noreplaygain - "$OUTPUTFILE"
 eval $eyed3Command
 
 exit 0