/etckeeper/init.d/20restore-etckeeper
http://github.com/brinkman83/bashrc · Shell · 22 lines · 14 code · 3 blank · 5 comment · 2 complexity · 776ab5b122b16e71b155680a3a6d3189 MD5 · raw file
- #!/bin/sh
- set -e
- # Used by .etckeeper to run a command if the file it acts on
- # (the last parameter) exists.
- maybe () {
- command="$1"
- shift 1
- if eval [ -e "\$$#" ]; then
- "$command" "$@"
- fi
- }
- # Yes, this runs code from the repository. As documented, etckeeper-init
- # should only be run on repositories you trust.
- if [ -e .etckeeper ]; then
- . ./.etckeeper
- else
- touch .etckeeper
- chmod 600 .etckeeper
- fi