setup:
* user confirmation * write config
This commit is contained in:
parent
4a4c6a966d
commit
e4ca4d63d8
@ -11,5 +11,72 @@ Completion is available for prompts asking for a paths or filenames.
|
|||||||
setupSource
|
setupSource
|
||||||
setupDestinations
|
setupDestinations
|
||||||
unset expr
|
unset expr
|
||||||
exit
|
writeConfig >"$cffile".tmp
|
||||||
|
unset \
|
||||||
|
sourcepath \
|
||||||
|
skippeddirectories \
|
||||||
|
maxload \
|
||||||
|
loadinterval \
|
||||||
|
ionice \
|
||||||
|
tempdir \
|
||||||
|
database \
|
||||||
|
debug \
|
||||||
|
destinationchannels \
|
||||||
|
destinationfat32compat \
|
||||||
|
destinationcopymime \
|
||||||
|
destinationformat \
|
||||||
|
destinationfrequency \
|
||||||
|
destinationid \
|
||||||
|
destinationloss \
|
||||||
|
destinationmaxbps \
|
||||||
|
destinationnormalize \
|
||||||
|
destinationpath \
|
||||||
|
destinationquality \
|
||||||
|
destinationrename \
|
||||||
|
destinationnoresample \
|
||||||
|
destinationrenamepath \
|
||||||
|
destinationskipmime
|
||||||
|
declare -A \
|
||||||
|
destinationchannels \
|
||||||
|
destinationfat32compat \
|
||||||
|
destinationcopymime \
|
||||||
|
destinationformat \
|
||||||
|
destinationfrequency \
|
||||||
|
destinationid \
|
||||||
|
destinationloss \
|
||||||
|
destinationmaxbps \
|
||||||
|
destinationnormalize \
|
||||||
|
destinationpath \
|
||||||
|
destinationquality \
|
||||||
|
destinationrename \
|
||||||
|
destinationnoresample \
|
||||||
|
destinationrenamepath \
|
||||||
|
destinationskipmime
|
||||||
|
oldcffile="$cffile"
|
||||||
|
cffile="$cffile".tmp
|
||||||
|
getConfig
|
||||||
|
{
|
||||||
|
echo $'Please review your new configuration:\n'
|
||||||
|
printConfig
|
||||||
|
}| less -F -e
|
||||||
|
cffile="$oldcffile"
|
||||||
|
read -p'Write config file? [y/N] ' do_write
|
||||||
|
case $do_write in
|
||||||
|
y)
|
||||||
|
mv -f "$cffile".tmp "$cffile"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
rm "$cffile".tmp
|
||||||
|
read -p'Re-run (s)etup, (q)uit [s/Q] ' do_rerun
|
||||||
|
case $do_rerun in
|
||||||
|
s) setup ;;
|
||||||
|
*) exit ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
read -p'Run now? [Y/n] ' do_run
|
||||||
|
case $do_run in
|
||||||
|
n) exit ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user