Apache Lucene open-source search software
LUCENE-3775: A shell script to generate .gitignore from svn:ignore properties.
Dawid Weiss76c285b1d397
diff --git a/dev-tools/scripts/gitignore-gen.sh b/dev-tools/scripts/gitignore-gen.shnew file mode 100755index 00000000000..cf703b2148b--- /dev/null+++ b/dev-tools/scripts/gitignore-gen.sh@@ -0,0 +1,21 @@+#!/bin/bash++rm -f .gitignore-new++for dir in `find . -path '*.svn*' -prune -o -type d -print | grep -v -e "/build"`; do+ ruby -e 'printf("SVN dir: %-70s", ARGV[0])' "$dir" >&2+ svn info $dir > /dev/null 2>&1+ if [ "$?" -eq "0" ]; then+ svn propget "svn:ignore" $dir | ruby -e 'while $stdin.gets; (puts ARGV[0].gsub(/^\./, "") + "/" + $_) unless $_.strip.empty?; end' "$dir" > .temp+ if [ -s .temp ]; then+ echo " OK" >&2+ echo -e "\n\n# $dir" >> .gitignore-new+ cat .temp >> .gitignore-new+ else+ echo " --" >&2+ fi+ rm .temp+ else+ echo " NOT svn controlled." >&2+ fi+done\ No newline at end of file