scriptpath="/media/smbdaten1/scripts"
# musicpath is collection directory
musicpath="/media/smbdaten1/musik-flac"
+albumlist="albumlist"
parallelopts=":"
curphase=1
phase=3
removework=false
cptodest=false
-if [ ! -f albumlist ]
-then
- printf "\nalbumlist does not exists\n\n"
- exit
-fi
-
-while getopts "m::rz::cS:" optname
+while getopts "i:m::rz::cS:" optname
do
case "$optname" in
"r")
dest="$OPTARG"
phase=$((phase + 1))
;;
+ "i")
+ albumlist="$OPTARG"
+ ;;
"S")
parallelopts="$OPTARG"
;;
esac
done
+if [ ! -f "$albumlist" ]
+then
+ printf "\nalbumlist does not exists\n\n"
+ exit
+fi
+
printf "\nPhase %02d of %02d: create symlinks of flac's to working directory %s\n" $((curphase++)) $phase "$work"
if [ ! -d $work ]
fi
# make symlinks of original flac's
-for i in $(cat albumlist)
+for i in $(cat "$albumlist")
do
cp -rs $musicpath/$i $work/
done