From acc4599cdf3a2a0de908908471896f2f54bdadd0 Mon Sep 17 00:00:00 2001 From: Johan Wassberg Date: Tue, 4 Oct 2022 15:56:25 +0200 Subject: Don't leave files like swamid-sp-2.0.mxml'' around --- scripts/get-metadata.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'scripts/get-metadata.sh') diff --git a/scripts/get-metadata.sh b/scripts/get-metadata.sh index 26534d3c..c3be62a4 100755 --- a/scripts/get-metadata.sh +++ b/scripts/get-metadata.sh @@ -22,12 +22,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/" @@ -90,7 +84,10 @@ case $x in read x case $x in Y|y|"") - $SEDI "s;^; \n&;" ../swamid-sp-2.0.mxml + sed -i.bak "s;^; \n&;" ../swamid-sp-2.0.mxml + if [ -f ../swamid-sp-2.0.mxml.bak ]; then + rm ../swamid-sp-2.0.mxml.bak + fi echo -- tail -n 10 ../swamid-sp-2.0.mxml | sed 's/^/ /' echo -- -- cgit v1.2.3