This file is indexed.

/usr/bin/create_svnignore is in kdesdk-scripts 4:17.12.3-0ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/env bash
# This script makes a preliminary svn:ignore in the current dir by
# adding some standard stuff according to Makefile.am.
# License: GPL

addignore() {
	if ! test -f svnignore.tmp; then
	   svn pg svn:ignore . | sed -e "s, *,," | grep -v '^$' > svnignore.tmp
	   addedsomething=0
	fi
	if ! grep -x -F -q "$1" svnignore.tmp; then
	  echo "$1" >> svnignore.tmp && echo "added $1 to svn:ignore"
	  sort -u -o svnignore.tmp svnignore.tmp
	  addedsomething=1
	fi
}

recurse=0
if test $# -eq 1; then
	if test "$1" = "-r"; then
		recurse=1
	fi
fi

handledir() {
	(
	cd $1
	trap "rm svnignore.tmp" 1 2 15
	addedsomething=0
	if test -f CMakeLists.txt; then
		if test $recurse -eq 1; then
			echo "Entering $1"
		fi
		addignore Makefile
        addignore CMakeFiles
        addignore cmake_install.cmake
        addignore DartTestfile.txt
        addignore install_icons.cmake
        addignore progress.make
		grep -q kde4_automoc CMakeLists.txt && addignore "*.moc" 
		grep -q kde4_add_dcop_skels CMakeLists.txt && addignore "*.kidl"
		grep -q kde4_add_dcop_skels CMakeLists.txt && addignore "*_skel.c*"
		grep -q kde4_add_dcop_stubs CMakeLists.txt && addignore "*_stub.cpp"
		#TODO add binary

	elif test -f Makefile.am; then
		if test $recurse -eq 1; then
			echo "Entering $1"
		fi
		addignore Makefile
		addignore Makefile.in
		
		bins=`perl -p -e 's/\\\s*\n/ /g' Makefile.am | grep _PROGRAMS | sed -e 's/.*=\s*//;s/#.*//;s/\$([^)]*)//'`
		if test -n "$bins"; then
			addignore ".libs"
			addignore ".deps"
			for prog in $bins; do
				addignore "$prog"
			done
		fi
		grep -q LIBRARIES Makefile.am && addignore ".libs"
		grep -q METASOURCES Makefile.am && addignore "*.moc"
		fgrep -q .skel Makefile.am && addignore "*.kidl"
		fgrep -q .skel Makefile.am && addignore "*_skel.c*"
		fgrep -q .stub Makefile.am && addignore "*_stub.cpp"
		
		grep -q "^include.*/Doxyfile.am$" Makefile.am && addignore "Doxyfile"
	else
		qmakefiles=`ls -1 *.pro 2>/dev/null`
		if test -n "$qmakefiles"; then
			if test $recurse -eq 1; then
        			echo "Entering $1"
        		fi
        		addignore Makefile
        		addignore .obj
        		addignore .moc
        		addignore "*.moc"
        		addignore "moc_*.cpp"
        		addignore .ui
        		for f in `ls -1 *.pro`; do
        		   if fgrep -q debug_and_release $f; then
        		    addignore "Makefile.Debug"
        		    addignore "Makefile.Release"
        		   fi
        		   template=`grep ^TEMPLATE $f | sed -e 's/.*=[ \t]*//'`
        		   if test -z "$template" -o "$template" = "app"; then
        		        target=`grep ^TARGET $f | sed -e 's/.*=[ \t]*//'`
                                test -z "$target" && target=`echo $f | sed -e 's/\.pro$//'`
        			addignore $target
        			addignore $target.exe
        			# addignore $target.app # Mac OSX, but only gui apps (grep for CONFIG?)
        		   fi
        		   # RESOURCES = foo.qrc -> addignore qrc_foo.cpp
        		   for resource in `perl -p -e 's/\\\s*\n/ /g' $f | grep ^RESOURCES | sed -e 's/.*=\s*//;s/#.*//;s/\$([^)]*)//'`; do
        		      addignore qrc_`echo $resource | sed -e 's/\.qrc$/\.cpp/'`
        		   done
        		   # FORMS = foo.ui -> addignore ui_foo.h
        		   for form in `perl -p -e 's/\\\s*\n/ /g' $f | grep ^FORMS | sed -e 's/.*=\s*//;s/#.*//;s/\$([^)]*)//'`; do
        		      addignore ui_`echo $form | sed -e 's/\.ui$/\.h/'`
        		   done
        		done
		else
			echo "Skipping $1"
		fi
	fi
	if test "$addedsomething" = 1; then
	    svn propset svn:ignore -F svnignore.tmp .
	fi
	rm -f svnignore.tmp
	)
}

qmakefiles=`ls -1 *.pro 2>/dev/null`
if test -f Makefile.am -o -n "$qmakefiles" -o -f CMakeLists.txt; then
	if test $recurse -eq 1; then
		find . -type d | egrep -v 'CVS|.svn' | sed -e 's,/$,,' | \
		while read dir; do
			handledir $dir
		done
	else
		handledir .
	fi
else
	echo "No Makefile.am found!"
fi