Private
Server IP : 195.201.23.43  /  Your IP : 3.21.43.104
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /etc/etckeeper/init.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /etc/etckeeper/init.d/60darcs-deleted-symlinks
#!/bin/sh
set -e

filter_ignore() {
	if [ "$VCS" = darcs ]; then
		ignorefile=.darcsignore
	fi

	if [ "$VCS" = darcs ] && [ -e "$ignorefile" ]; then
		# Spaces embedded into patterns would break it.
		# But really, why would anyone want to use ' ' instead of '\s' ?
		#patterns=$( grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" | xargs -n 1 printf " -e %s" )
		#grep -Ev $patterns
		#unset patterns
		# Alternative using a temp file
		patternsfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )"
		grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" > "$patternsfile" || true
		grep -Evf "$patternsfile"
		rm -f "$patternsfile"
		unset patternsfile
	else
		cat -
	fi
}


if [ "$VCS" = darcs ];then
	NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o'

	# We assume that if .etckeeper is empty this is the first run
	if [ -s .etckeeper ]; then
		linksindex="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )"
		grep '^ln -s' .etckeeper | while IFS="'" read n n n link n; do
			printf "%s\n" "$link" >> "$linksindex"
		done

		# Warn about symbolic links that shouldn't exist
		if links=$( find $NOVCS -type l -print | filter_ignore | grep -vFf "$linksindex" ); then
			printf "%s\n%s\n" \
				"The following symbolic links should not exist:" \
				"$links" >&2
		fi

		rm -f "$linksindex"
		unset links linksindex
	fi

fi
Private