$OpenBSD: patch-kde-dev-scripts_qt4_replaceAddRowSpacing_sh,v 1.1 2013/07/05 14:32:50 zhuk Exp $
Cleanup development scripts, making them more portable and secure.
Upstream review 110858: http://git.reviewboard.kde.org/r/110858/
--- kde-dev-scripts/qt4/replaceAddRowSpacing.sh.orig	Fri Jun 28 22:03:13 2013
+++ kde-dev-scripts/qt4/replaceAddRowSpacing.sh	Fri Jul  5 18:14:32 2013
@@ -1,15 +1,15 @@
-#!/bin/bash
+#!/bin/sh
 
 # trivial script to replace add(Row|Col)Spacing with the new Qt4 idioms (addItem( new QSpacerItem(.,.), .,. )).
 # If the arguments to addRowSpacing are complex expressions, this script fails (and replaces a mess). So you better look at the diff that is generated by this script!
 # CAUTION: Use at your own risk.
 # I do not assert any rights on these few trivial lines of code, Reinhold Kainhofer
 
-for i in `grep -le addRowSpacing -e addColSpacing -r [ac-z]* | grep -v '\.svn'`; do
+for i in `grep -le addRowSpacing -e addColSpacing -R [ac-z]* | grep -v '\.svn'`; do
   sed "
       s/addRowSpacing\ *(\ *\([^,]*\),\(.*\));/addItem( new QSpacerItem( 0,\2), \1, 0 );/g;
-      s/addColSpacing\ *(\ *\([^,]*\),\(.*[^ ]\)\ *);/addItem( new QSpacerItem(\2, 0 ), 0, \1 );/g" $i > $i.new;
-	echo $i;
-	diff $i $i.new;
-	mv $i.new $i
+      s/addColSpacing\ *(\ *\([^,]*\),\(.*[^ ]\)\ *);/addItem( new QSpacerItem(\2, 0 ), 0, \1 );/g" "$i" > "$i.new";
+	echo "$i"
+	diff "$i" "$i.new"
+	mv "$i.new" "$i"
 done
