You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
514 B
Plaintext

2 years ago
#!/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