mirror of
https://github.com/sbopkg/sbopkg
synced 2024-12-29 10:24:11 +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
|
||||
fi
|
||||
if [[ -e $HOME/.sbopkg.conf ]]; then
|
||||
sed -i "s/^SLACKVER.*$/SLACKVER=$SLACKVER/" $HOME/.sbopkg.conf
|
||||
else
|
||||
echo "SLACKVER=$SLACKVER" > $HOME/.sbopkg.conf
|
||||
sed -i '/^SLACKVER=.*$/d' $HOME/.sbopkg.conf
|
||||
fi
|
||||
echo "SLACKVER=$SLACKVER" >> $HOME/.sbopkg.conf
|
||||
break
|
||||
done
|
||||
rm -f $SBOPKGTMP/sbopkg_version_selection
|
||||
|
|
Loading…
Reference in a new issue