Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > cedef3a8ba2eba485c367c1d3a4bab71 > files > 31

etckeeper-1.10-1.fc18.noarch.rpm

#!/bin/sh
set -e

exclude_internal () {
	egrep -v '(^|/)(.git|.hg|.bzr|_darcs)/'
}

if [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then
	special=$(find . -not -type d -not -type f -not -type l | exclude_internal) || true
	hardlinks=$(find . -type f -not -links 1 | exclude_internal ) || true
elif [ "$VCS" = hg ]; then
	special=$(find . -not -type d -not -type f -not -type l | exclude_internal) || true
	hardlinks=$(find . -type f -not -links 1 -exec hg status {} \; | exclude_internal ) || true
elif [ "$VCS" = git ]; then
	special=$(find . -not -type d -not -type f -not -type l -exec git ls-files --exclude-standard --cached --others {} \; | exclude_internal) || true
	hardlinks=$(find . -type f -not -links 1 -exec git ls-files --exclude-standard --cached --others {} \; | exclude_internal) || true
else
	special=""
fi
	
if [ -n "$special" ] && [ -z "$AVOID_SPECIAL_FILE_WARNING" ]; then
	echo "etckeeper warning: special files could cause problems with $VCS:" >&2
	echo "$special" >&2
fi
if [ -n "$hardlinks" ] && [ -z "$AVOID_SPECIAL_FILE_WARNING" ]; then
	echo "etckeeper warning: hardlinked files could cause problems with $VCS:" >&2
	echo "$hardlinks" >&2
fi

true