From f22f092dfb538a5380b4662c7e8df5f606317977 Mon Sep 17 00:00:00 2001 From: Andrew Clemons Date: Sat, 27 Aug 2022 08:20:31 +0900 Subject: [PATCH] system/restic: Compress man pages, fix doinst.sh errors. The zsh and bash completion files are not created with a .new suffix so this doinst.sh does not have anything to do. Removed now completely. cat: usr/share/bash-completion/completions/restic.new: No \ such file or directory cat: usr/share/zsh/site-functions/_restic.new: No such \ file or directory Signed-off-by: Andrew Clemons --- system/restic/doinst.sh | 15 --------------- system/restic/restic.SlackBuild | 4 +++- 2 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 system/restic/doinst.sh diff --git a/system/restic/doinst.sh b/system/restic/doinst.sh deleted file mode 100644 index 4564772e86..0000000000 --- a/system/restic/doinst.sh +++ /dev/null @@ -1,15 +0,0 @@ -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 usr/share/bash-completion/completions/restic.new -config usr/share/zsh/site-functions/_restic.new diff --git a/system/restic/restic.SlackBuild b/system/restic/restic.SlackBuild index 09b22811f3..09be5d0bbf 100644 --- a/system/restic/restic.SlackBuild +++ b/system/restic/restic.SlackBuild @@ -85,6 +85,9 @@ install -D -m 0755 $PRGNAM $PKG/usr/bin/$PRGNAM mkdir -p $PKG/usr/man/man1 $PKG/usr/bin/$PRGNAM generate --man $PKG/usr/man/man1/ +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + mkdir -p $PKG/usr/share/bash-completion/completions $PKG/usr/bin/$PRGNAM generate --bash-completion $PKG/usr/share/bash-completion/completions/restic @@ -96,7 +99,6 @@ 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 cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE