mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-28 11:25:20 +01: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
|