File: 50uncommitted-changes

package info (click to toggle)
etckeeper 1.15
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 412 kB
  • ctags: 41
  • sloc: sh: 1,072; python: 64; makefile: 58
file content (15 lines) | stat: -rwxr-xr-x 514 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
set -e

if etckeeper unclean; then
	if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then
		echo "" >&2
		echo "** etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 
		echo "** Aborting $HIGHLEVEL_PACKAGE_MANAGER run. Manually commit and restart." >&2
		echo "" >&2
		exit 1
	fi
	if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then
		echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2
	fi
fi