Configure: Fix option c when p is not available

This commit is contained in:
Daniel unbrot Pätzold
2026-06-17 08:45:45 +02:00
parent ac85c665a8
commit 334c00e197
+4 -5
View File
@@ -44,13 +44,11 @@ do_configure() {
if [ -f "$CONF_FILE" ] || [ -f "$CONF_PRE" ]; then if [ -f "$CONF_FILE" ] || [ -f "$CONF_PRE" ]; then
echo "Some alternatives found for configure source:" echo "Some alternatives found for configure source:"
if [[ -f "$CONF_PRE" ]]; then if [[ -f "$CONF_PRE" ]]; then
echo " Choice (p): Another config run result was found in $CONF_PRE ." echo " Choice (p): Another config run result was found in $CONF_PRE."
echo " Hint: May contain Values that already were setup different for your details" echo " Hint: May contain Values that already were setup different for your details"
else
unset CONF_PRE
fi fi
if [[ -f "$CONF_FILE" ]]; then if [[ -f "$CONF_FILE" ]]; then
echo " Choice (c): Found companys full config in $CONF_FILE ." echo " Choice (c): Found companys full config in $CONF_FILE."
echo " This may be a full config, that is valid for your company." echo " This may be a full config, that is valid for your company."
else else
unset CONF_FILE unset CONF_FILE
@@ -64,12 +62,13 @@ do_configure() {
case "${CHOICE}" in case "${CHOICE}" in
"p") "p")
if [[ -f "$CONF_PRE" ]]; then if [[ -f "$CONF_PRE" ]]; then
echo "Using the existing config run file." echo "Using the existing config run file $CONF_PRE"
break break
fi fi
;; ;;
"c") "c")
if [[ -f "$CONF_FILE" ]]; then if [[ -f "$CONF_FILE" ]]; then
echo "Replacing $CONF_PRE with $CONF_FILE"
rm "$CONF_PRE" >/dev/null 2>&1 rm "$CONF_PRE" >/dev/null 2>&1
cp "$CONF_FILE" "$CONF_PRE" && break cp "$CONF_FILE" "$CONF_PRE" && break
fi fi