# INSTALL do_that() { if [ -f etc/default/grub-btrfs/config ]; then if ! grep -q void.conf etc/default/grub-btrfs/config; then echo "file=\"/etc/default/grub-btrfs/void.conf\"" >> etc/default/grub-btrfs/config echo '[ -f "${file}" ] && . "${file}"' >> etc/default/grub-btrfs/config fi fi if [ -f etc/void-snapshot.cfg ]; then if ! grep -q -e NO_UPDATE_GRUB -e REGULAR_SNAPSHOT_HOME etc/void-snapshot.cfg; then rm etc/void-snapshot.cfg fi fi if [ -e var/spool/cron/root ]; then if ! grep -q "#void.system" var/spool/cron/root; then echo '0 * * * * /usr/bin/void-snapshot cron #void.system' >> var/spool/cron/root else if grep "#void.system" var/spool/cron/root | grep -q "^#"; then sed -i '/#void.system/d' var/spool/cron/root echo '#0 * * * * /usr/bin/void-snapshot cron #void.system' >> var/spool/cron/root else sed -i '/#void.system/d' var/spool/cron/root echo '0 * * * * /usr/bin/void-snapshot cron #void.system' >> var/spool/cron/root fi fi fi } case "$ACTION" in pre) #Actions here ;; post) do_that if [ "$UPDATE" = "yes" ]; then echo update else echo new install fi ;; esac