mirror of
https://github.com/zrepl/zrepl.git
synced 2025-04-09 19:09:02 +02:00
23 lines
358 B
Bash
23 lines
358 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
[ "$ZREPL_DRYRUN" = "true" ] && DRYRUN="echo DRYRUN: "
|
|
|
|
pre_snapshot() {
|
|
$DRYRUN date
|
|
}
|
|
|
|
post_snapshot() {
|
|
$DRYRUN date
|
|
}
|
|
|
|
case "$ZREPL_HOOKTYPE" in
|
|
pre_snapshot|post_snapshot)
|
|
"$ZREPL_HOOKTYPE"
|
|
;;
|
|
*)
|
|
printf 'Unrecognized hook type: %s\n' "$ZREPL_HOOKTYPE"
|
|
exit 255
|
|
;;
|
|
esac
|