diff options
-rwxr-xr-x | scripts/rename-xml.sh | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/rename-xml.sh b/scripts/rename-xml.sh index e82742d9..59a0f04b 100755 --- a/scripts/rename-xml.sh +++ b/scripts/rename-xml.sh @@ -18,12 +18,6 @@ EOF exit 1 fi -if [ `uname -s` == "Darwin" ]; then - SEDI="sed -i ''" -else - SEDI="sed -i" -fi - script_cwd=`dirname "$0"` if test -d swamid-2.0 ; then echo "Moving into swamid-2.0/" @@ -56,7 +50,11 @@ read x case $x in Y|y|"") grep -l "$metadata\"" ../*.mxml | while read file; do - $SEDI "s;href=\"swamid-2.0/$metadata\";href=\"swamid-2.0/$entityidfn\";" $file + sed -i.bak "s;href=\"swamid-2.0/$metadata\";href=\"swamid-2.0/$entityidfn\";" $file + if [ -f ${file}.bak ]; then + rm ${file}.bak + fi + done git mv $metadata $entityidfn |