mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-19 10:26:56 +01:00
Fix per-user SLACKVER setting.
If the user ever created a personal sbopkg.conf file not containing the SLACKVER=... line, the old code would not add it. This patch fixes the code by removing the assignment if it exists, and then unconditionally adding the new one at the end. Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
This commit is contained in:
parent
449e2371a9
commit
3ddf3a7067
1 changed files with 2 additions and 3 deletions
|
@ -782,10 +782,9 @@ select_version() {
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [[ -e $HOME/.sbopkg.conf ]]; then
|
if [[ -e $HOME/.sbopkg.conf ]]; then
|
||||||
sed -i "s/^SLACKVER.*$/SLACKVER=$SLACKVER/" $HOME/.sbopkg.conf
|
sed -i '/^SLACKVER=.*$/d' $HOME/.sbopkg.conf
|
||||||
else
|
|
||||||
echo "SLACKVER=$SLACKVER" > $HOME/.sbopkg.conf
|
|
||||||
fi
|
fi
|
||||||
|
echo "SLACKVER=$SLACKVER" >> $HOME/.sbopkg.conf
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
rm -f $SBOPKGTMP/sbopkg_version_selection
|
rm -f $SBOPKGTMP/sbopkg_version_selection
|
||||||
|
|
Loading…
Reference in a new issue