Small improvemnt for addConfig() if target does not exist for dry run

This commit is contained in:
2022-02-16 15:18:18 +01:00
parent 1c99aee146
commit 4dfc6cdce9

View File

@@ -9,7 +9,7 @@
VERSION_REV=15 VERSION_REV=15
VERSION_MAJOR=0 VERSION_MAJOR=0
VERSION_MINOR=0 VERSION_MINOR=1
## Start of generic script part ## Start of generic script part
@@ -637,15 +637,15 @@ addConf() {
echoerr " [E] Source: \"$source\" does not exist" echoerr " [E] Source: \"$source\" does not exist"
return 1; return 1;
fi fi
if [ "$dest" == "" ] ; then if [ $DRY -ne 0 ] ; then
echo " [I] Writing $dest ...dry-run"
return 0;
fi
if [ -z "$dest" ] ; then
echoerr " [E] Destination empty" echoerr " [E] Destination empty"
return 1; return 1;
fi fi
if [ "$DRY" -ne 0 ] ; then
echo " [I] Writing $dest ...dry-run"
return 0;
fi
echo -n " [I] Writing $dest ..." echo -n " [I] Writing $dest ..."
if [ $confMode != "-m" ] ; then if [ $confMode != "-m" ] ; then