summaryrefslogtreecommitdiffstats
path: root/scripts/svnaddcurrentdir
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /scripts/svnaddcurrentdir
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'scripts/svnaddcurrentdir')
-rwxr-xr-xscripts/svnaddcurrentdir30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/svnaddcurrentdir b/scripts/svnaddcurrentdir
new file mode 100755
index 00000000..2474bb01
--- /dev/null
+++ b/scripts/svnaddcurrentdir
@@ -0,0 +1,30 @@
+#!/bin/sh
+#Alexander Neundorf <neundorf@kde.org>
+#copyright 2002, GPL
+
+#call this script to add all files in and below the current dir to SVN
+#it adds *.c, *.h, *.C, *.cpp, *.cc automatically
+#*~, *.o, *.so, *.lo, *.la, .libs/, .deps/, .#* are ignored
+#it asks for the remaining files
+
+
+#ignore dirs "CVS", ".deps", ".libs" ".svn"
+#ignore files *.o, *.so, *.lo, *.la, *~, .#*
+FOUND=`find |grep -v "^\.$"| grep -v CVS| grep -v "\.[ls]\?o$"|grep -v "~$"|grep -v "\.libs/"|grep -v "\.deps/" |grep -v "\.svn/" |grep -v "\.depend/"| grep -v "/\.#" |grep -v "\.la$"`
+#echo $FOUND
+
+ask_for_adding() {
+echo
+read -p "Add file $file to SVN ? (y/n) " answer rest
+#if [ "$answer" != "y" ]; then echo $file; fi
+if [ "$answer" == "y" ]; then svn add $file; fi
+}
+
+
+for file in $FOUND
+do
+#matches all *.h, *.c, *.cpp, *.C, *.cpp, *.cc (and some others too)
+ echo $file | grep "\.[cCh][cp]\?p\?$" && svn add $file
+ echo $file | grep -v "\.[cCh][cp]\?p\?$" && ask_for_adding
+done
+