summaryrefslogtreecommitdiffstats
path: root/admin/sedfiles.sh
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-26 19:11:44 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-26 19:11:44 +0000
commitf677d2717dd41d04a15f68036217042583ffe097 (patch)
tree556e130daf60b843406e948979e952a06ca2eaa9 /admin/sedfiles.sh
parenta6d58bb6052ac8cb01805a48c4ad2f129126116f (diff)
downloadkvirc-f677d2717dd41d04a15f68036217042583ffe097.tar.gz
kvirc-f677d2717dd41d04a15f68036217042583ffe097.zip
Added kvirc-specific admin directory
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1096505 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'admin/sedfiles.sh')
-rwxr-xr-xadmin/sedfiles.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/admin/sedfiles.sh b/admin/sedfiles.sh
new file mode 100755
index 00000000..00cf942f
--- /dev/null
+++ b/admin/sedfiles.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+if test -z "$*"; then
+ echo "No files to parse"
+ exit
+fi
+
+
+SEARCH="contextStackSize"
+REPLACE="actualStackSize"
+
+echo "Searching for $SEARCH"
+echo "Replacing with $REPLACE"
+
+for afile in $*; do
+ DATA=`grep "$SEARCH" $afile`
+
+ if test -n "$DATA"; then
+
+ echo "Processing $afile ..."
+
+ rm -f $afile.backup
+ rm -f $afile.backup2
+
+ cp $afile $afile.backup
+
+ COMMAND="s/$SEARCH/$REPLACE/g"
+ echo "`cat $afile.backup | sed -e $COMMAND`" > $afile
+
+ if grep "$SEARCH" $afile; then
+ echo "Ops.. maybe it didn't work..."
+ else
+ echo "Ok, it worked."
+ fi
+ fi
+
+done