mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-06 08:26:50 +01:00
system/restic: man/completion files for version 0.12.1
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
6c069bb3d8
commit
c99dc9bb85
2 changed files with 25 additions and 0 deletions
15
system/restic/doinst.sh
Normal file
15
system/restic/doinst.sh
Normal file
|
@ -0,0 +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 usr/share/bash-completion/completions/restic.new
|
||||
config usr/share/zsh/site-functions/_restic.new
|
|
@ -82,11 +82,21 @@ find -L . \
|
|||
mkdir -p $PKG/usr/bin
|
||||
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/
|
||||
|
||||
mkdir -p $PKG/usr/share/bash-completion/completions
|
||||
$PKG/usr/bin/$PRGNAM generate --bash-completion $PKG/usr/share/bash-completion/completions/restic
|
||||
|
||||
mkdir -p $PKG/usr/share/zsh/site-functions
|
||||
$PKG/usr/bin/$PRGNAM generate --zsh-completion $PKG/usr/share/zsh/site-functions/_restic
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue