Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
James Barnett committed Mar 11, 2016
1 parent afae3b4 commit 02c4a88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions snapper-pac-post
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

if [ -f /.snapperpacpre ]; then
SNAPPERPACPRE=$(cat /.snapperpacpre)
PREFILE=/etc/snapper/.snap-pac-pre
if [ -f $PREFILE]; then
SNAPPERPACPRE=$(cat $PREFILE)
snapper --config root create --type post --pre-number $SNAPPERPACPRE --description "pacman posttransaction"
rm /.snapperpacpre
rm $PREFILE
else
echo "No pacman pre snapshot was performed, so not performing post snapshot. If you are installing pac-snap, this is normal."
echo "WARNING: $PREFILE does not exist, so not performing post snapshot. If you are initially installing snap-pac, this is normal."
fi
2 changes: 1 addition & 1 deletion snapper-pac-pre
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

snapper --config root create --type pre --print-number --description "pacman pretransaction" > /.snapperpacpre
snapper --config root create --type pre --print-number --description "pacman pretransaction" > /etc/snapper/.snap-pac-pre

0 comments on commit 02c4a88

Please sign in to comment.