complete consolidation into one script

This commit is contained in:
James Barnett 2016-04-25 18:19:40 -05:00
parent 8f5989df84
commit d392bf411b
7 changed files with 4 additions and 74 deletions

View file

@ -27,4 +27,4 @@ Target = *
Description = snapper post snapshot
Depends = snapper
When = PostTransaction
Exec = /usr/share/libalpm/hooks.bin/snap-pac/snapper-post
Exec = /usr/bin/bash -c ". /usr/share/libalpm/hooks.bin/snap-pac/snap-pac; post"

View file

@ -27,4 +27,4 @@ Target = *
Description = snapper pre snapshot
Depends = snapper
When = PreTransaction
Exec = /usr/share/libalpm/hooks.bin/snap-pac/snapper-pre
Exec = /usr/bin/bash -c ". /usr/share/libalpm/hooks.bin/snap-pac/snap-pac; pre"

View file

@ -24,4 +24,4 @@ Target = snap-pac
[Action]
Description = snap-pac cleanup upon removal
When = PreTransaction
Exec = /usr/share/libalpm/hooks.bin/snap-pac/snap-pac-clean
Exec = /usr/bin/bash -c ". /usr/share/libalpm/hooks.bin/snap-pac/snap-pac; clean"

View file

@ -22,14 +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 -d $INSTALL_DIR/etc
install -Dm 755 snapper-pre $SCRIPTS_DIR
install -Dm 755 snapper-post $SCRIPTS_DIR
install -Dm 755 snap-pac-clean $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

View file

@ -1,21 +0,0 @@
#!/bin/bash
# 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.
source /usr/share/libalpm/hooks.bin/snap-pac/snap-pac; clean

View file

@ -1,23 +0,0 @@
#!/bin/bash
# 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.
# Takes a snapper post snapshot after a pacman transaction
source /usr/share/libalpm/hooks.bin/snap-pac/snap-pac; post

View file

@ -1,23 +0,0 @@
#!/bin/bash
# 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.
# Takes a snapper pre snapshot before a pacman transaction
source /usr/share/libalpm/hooks.bin/snap-pac/snap-pac; pre