diff options
author | Björn Mattsson <Bjorn.Mattsson@bth.se> | 2018-02-07 13:36:43 +0100 |
---|---|---|
committer | Björn Mattsson <Bjorn.Mattsson@bth.se> | 2018-02-07 13:36:43 +0100 |
commit | 06c5ff45334068ef9f4c296a176d716cfe6d2a1c (patch) | |
tree | ece83543d40765c4ccd1a81f243b9f24d61f34b2 /scripts/remove_entity.sh | |
parent | d21807301fa0a818572c1c3d78b55995c9bc4bdf (diff) |
Resolved SWAMID-470
Diffstat (limited to 'scripts/remove_entity.sh')
-rwxr-xr-x | scripts/remove_entity.sh | 15 |
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 |