remove cleanup hook; change script dir

This commit is contained in:
James Barnett 2016-04-26 14:35:45 -05:00
parent e7844991a0
commit 44bef72930
2 changed files with 1 additions and 29 deletions

View file

@ -1,27 +0,0 @@
# snap-pac
# https://github.com/wesbarnett/snap-pac
# Copyright (C) 2016 James W. Barnett
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
[Trigger]
Operation = Remove
Type = Package
Target = snap-pac
[Action]
Description = snap-pac cleanup upon removal
When = PreTransaction
Exec = /usr/bin/bash -c "rm /usr/share/libalpm/hooks.bin/snap-pac/.pre*; echo 'No post snapshot will be performed, since you are removing the pacman hooks.'"

View file

@ -22,12 +22,11 @@
# PKGBUILD that installs using "./install $pkgdir".
INSTALL_DIR=$1
SCRIPTS_DIR=$INSTALL_DIR/usr/share/libalpm/hooks.bin/snap-pac
SCRIPTS_DIR=$INSTALL_DIR/usr/share/libalpm/hooks.bin/
HOOKS_DIR=$INSTALL_DIR/usr/share/libalpm/hooks/
install -d $HOOKS_DIR
install -d $SCRIPTS_DIR
install -Dm 755 snap-pac $SCRIPTS_DIR
install -Dm 644 10_snapper-pre.hook $HOOKS_DIR
install -Dm 644 10_snapper-post.hook $HOOKS_DIR
install -Dm 644 20_snap-pac-clean.hook $HOOKS_DIR
install -Dm 644 LICENSE "$INSTALL_DIR/usr/share/licenses/snap-pac/LICENSE"