Detects if installed system is Slackware Current

If the installed system is Slackware Current, creates the
`/var/lib/slackpkg/current` file by default, saving the user from
being asked about using a `current` mirror in a Slackware stable
install.
This commit is contained in:
piterpunk 2023-04-05 20:16:31 -03:00
parent 10230a06cc
commit e0b0a08913

View file

@ -64,6 +64,12 @@ function system_setup() {
# Create $WORKDIR just in case
mkdir -p "${WORKDIR}"
# Set the "current" flag if system is running Slackware Current
if [ -n "$(echo $SLACKWARE_VERSION | sed -ne 's/.*\(+\|current\)$/\1/pi')" ] && \
[ ! -e ${WORKDIR}/current ]; then
touch ${WORKDIR}/current
fi
# Select the command to fetch files and packages from network sources
if [ "$DOWNLOADER" = "curl" ]; then
DOWNLOADER="curl ${CURLFLAGS} -o"
@ -188,7 +194,7 @@ as example or overwrite it with slackpkg.conf.new.\n\
if [ "$ARCH" = "none" ] && [ "$CMD" != "new-config" ]; then
echo -e "\
\nThe ARCH values in slackpkg.conf are now different. You can remove\n\
ARCH from there, and slackpkg you use your current ARCH or you can look\n\
ARCH from there, and slackpkg will use your current ARCH or you can look\n\
at slackpkg.conf.new or slackpkg.conf manual page to see the new valid\n\
ARCH values\n"
cleanup