summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-07-04 00:11:13 +0200
committernavewindre <boneyaard@gmail.com>2025-07-04 00:11:13 +0200
commit147b0163d1ca8b95aba2463919afa8293e2daf88 (patch)
tree8dfa5586d2d84e2819ec8db217342abe796467e2
parentf3ea61e058d0e05d70a7a78401e21ac06f486985 (diff)
post funcs
-rw-r--r--slackware-bootstrap/post-functions.conf18
-rwxr-xr-xslackware-bootstrap/step14
2 files changed, 22 insertions, 0 deletions
diff --git a/slackware-bootstrap/post-functions.conf b/slackware-bootstrap/post-functions.conf
new file mode 100644
index 0000000..431a381
--- /dev/null
+++ b/slackware-bootstrap/post-functions.conf
@@ -0,0 +1,18 @@
+# You can list here the .new files and the default action
+# to do for each file. The list format is:
+#
+# /full/path/of/dot/new/file.new:action
+#
+# The action can be:
+#
+# O to Overwrite it with the new version
+# R to Remove the new file
+# K to Keep the current and the .new files
+#
+# Using "default" as file name, you'll set the action for
+# the .new files in batch mode. The action for each file
+# takes precedence over the "default" one.
+#
+# E.g:
+/etc/slackpkg/mirrors.new:K
+default:O
diff --git a/slackware-bootstrap/step1 b/slackware-bootstrap/step1
index d48abac..cfb5e80 100755
--- a/slackware-bootstrap/step1
+++ b/slackware-bootstrap/step1
@@ -1,6 +1,8 @@
#!/bin/bash
basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+cp $basedir/post-functions.conf /etc/slackpkg/post-functions.conf
+
if [[ -f "~/.step1-done" ]]; then
sh $basedir/step2
exit
@@ -18,6 +20,8 @@ if [[ ! -f "~/.purge-done" ]]; then
sh $basedir/package-purge
fi
+rm /etc/slackpkg/post-functions.conf
+
echo "sh $basedir/step2" >> /root/.bash_profile
touch ~/.step1-done