summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/remove_entity.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/remove_entity.sh b/scripts/remove_entity.sh
index 8945a430..66a38235 100755
--- a/scripts/remove_entity.sh
+++ b/scripts/remove_entity.sh
@@ -15,15 +15,26 @@ case $x in
esac
echo
+if [ `uname -s` == "Darwin" ]; then
+ MacOSX = true
+fi
if (grep -q $1 sp-with-simplesign); then
- sed -i "/$1/d" sp-with-simplesign
+ if ( $MacOSX ) ; then
+ sed -i "" "/$1/d" sp-with-simplesign
+ else
+ sed -i "/$1/d" sp-with-simplesign
+ fi
fi
grep $1 *.mxml | sed 's/.*: <xi:include href="\(.*\)"\/>/\1/' | while read file ; do
git rm $file
done
grep $1 *.mxml | sed 's/\(.*\.mxml\): <xi:include href=".*"\/>/\1/' | while read file ; do
- sed -i "/$1/d" $file
+ if ( $MacOSX ) ; then
+ sed -i "" "/$1/d" $file
+ else
+ sed -i "/$1/d" $file
+ fi
done
git diff