From 562c2d88385114b783822a9ac8a721d74c7546e4 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 8 Mar 2023 01:38:04 -0500 Subject: [PATCH] misc/pinfo: Add douninst.sh. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- misc/pinfo/doinst.sh | 5 +---- misc/pinfo/douninst.sh | 6 ++++++ misc/pinfo/pinfo.SlackBuild | 5 ++++- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 misc/pinfo/douninst.sh diff --git a/misc/pinfo/doinst.sh b/misc/pinfo/doinst.sh index 3354151c29..d514aad218 100644 --- a/misc/pinfo/doinst.sh +++ b/misc/pinfo/doinst.sh @@ -1,18 +1,15 @@ 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/pinforc.new if [ -x /usr/bin/install-info ]; then - chroot . /usr/bin/install-info --info-dir=/usr/info /usr/info/pinfo.info.gz 2> /dev/null + /usr/bin/install-info usr/info/pinfo.info.gz usr/info/dir fi diff --git a/misc/pinfo/douninst.sh b/misc/pinfo/douninst.sh new file mode 100644 index 0000000000..1bef502028 --- /dev/null +++ b/misc/pinfo/douninst.sh @@ -0,0 +1,6 @@ +if [ -x /usr/bin/install-info -a -d usr/info ]; then + ( cd usr/info + rm -f dir + for i in *.info*; do /usr/bin/install-info $i dir 2>/dev/null; done + ) +fi diff --git a/misc/pinfo/pinfo.SlackBuild b/misc/pinfo/pinfo.SlackBuild index e4325224fd..dcc2d2d05f 100644 --- a/misc/pinfo/pinfo.SlackBuild +++ b/misc/pinfo/pinfo.SlackBuild @@ -24,6 +24,8 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230308 bkw: BUILD=3, add douninst.sh to clean up GNU info dir. + # 20200708 bkw: BUILD=2 # - restore old 'pman' link (nothing conflicts) # - fix homepage in slack-desc @@ -39,7 +41,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pinfo VERSION=${VERSION:-0.6.13} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -124,6 +126,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/douninst.sh > $PKG/install/douninst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE