aboutsummaryrefslogtreecommitdiffstats
path: root/main/etckeeper/apk-commit_hook
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2019-12-16 08:28:08 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2019-12-16 15:33:18 +0000
commit1f407f2c90b66d1e0884c89bf64ebb7fc296a4da (patch)
tree72c14e39db276fa8f108931ca4705ee02e03c4bc /main/etckeeper/apk-commit_hook
parent0dcdc04443d1ff9cf8876130b9cc6e8ac1102a04 (diff)
downloadaports-1f407f2c90b66d1e0884c89bf64ebb7fc296a4da.tar.bz2
aports-1f407f2c90b66d1e0884c89bf64ebb7fc296a4da.tar.xz
main/etckeeper: move from community
Diffstat (limited to 'main/etckeeper/apk-commit_hook')
-rw-r--r--main/etckeeper/apk-commit_hook22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/etckeeper/apk-commit_hook b/main/etckeeper/apk-commit_hook
new file mode 100644
index 0000000000..a662c81a81
--- /dev/null
+++ b/main/etckeeper/apk-commit_hook
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+
+[ -x /usr/bin/etckeeper ] || exit
+[ -x /usr/bin/git ] || exit
+[ -x /usr/bin/find ] || exit
+
+AVOID_SPECIAL_FILE_WARNING=1
+export AVOID_SPECIAL_FILE_WARNING
+
+case "$1" in
+ pre-commit)
+ etckeeper pre-install
+ ;;
+ post-commit)
+ etckeeper post-install
+ ;;
+
+ *)
+ echo "$0: Un-handled action: $1"
+ ;;
+esac