summaryrefslogtreecommitdiff
path: root/source/a
diff options
context:
space:
mode:
Diffstat (limited to 'source/a')
-rwxr-xr-xsource/a/dialog/dialog.SlackBuild7
-rw-r--r--source/a/dialog/doinst.sh14
2 files changed, 19 insertions, 2 deletions
diff --git a/source/a/dialog/dialog.SlackBuild b/source/a/dialog/dialog.SlackBuild
index ba3a8722..15080908 100755
--- a/source/a/dialog/dialog.SlackBuild
+++ b/source/a/dialog/dialog.SlackBuild
@@ -42,7 +42,7 @@ PKGNAM=dialog
# We'll determine $VERSION automatically again (for now):
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -130,6 +130,9 @@ cat samples/slackware.rc > $PKG/etc/dialogrc
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libdialog.a
rmdir $PKG/usr/lib${LIBDIRSUFFIX} 2> /dev/null
+# Ship the config file as .new:
+mv $PKG/etc/dialogrc $PKG/etc/dialogrc.new
+
mkdir -p $PKG/bin
mv $PKG/usr/bin/dialog $PKG/bin
( cd $PKG/usr/bin
@@ -170,8 +173,8 @@ if [ -r CHANGES ]; then
fi
mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $TMP/package-${PKGNAM}
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
-
diff --git a/source/a/dialog/doinst.sh b/source/a/dialog/doinst.sh
new file mode 100644
index 00000000..c3511331
--- /dev/null
+++ b/source/a/dialog/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/dialogrc.new