HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //etc/etckeeper/pre-commit.d/20warn-problem-files
#!/bin/sh
set -e

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

if [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then
	special=$(find . ! -type d ! -type f ! -type l | exclude_internal) || true
	hardlinks=$(find . -type f ! -links 1 | exclude_internal ) || true
elif [ "$VCS" = hg ]; then
	special=$(find . ! -type d ! -type f ! -type l | exclude_internal) || true
	hardlinks=$(find . -type f ! -links 1 -exec hg status {} \; | exclude_internal ) || true
elif [ "$VCS" = git ]; then
	special=$(find . ! -type d ! -type f ! -type l -exec git ls-files --exclude-standard --cached --others {} + | exclude_internal) || true
	hardlinks=$(find . -type f ! -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