From a8caa2f6d77c81a5d32c254bb17accd60c032f54 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Fri, 28 Jan 2011 13:39:39 -0800 Subject: [PATCH] remove-exchange-support.sh supports MacOS The problem was that you can't omit the parameter for -i (the extension for backup files) with Mac's sed. Change-Id: I8cc5404d5d99526c160082c357fc38629e08d7d2 --- remove-exchange-support.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/remove-exchange-support.sh b/remove-exchange-support.sh index 6d175949f..2c08f02b6 100755 --- a/remove-exchange-support.sh +++ b/remove-exchange-support.sh @@ -20,7 +20,6 @@ set -e # fail fast - # Step 0. Make sure we're in the right directory, and the user really wants it. if [[ ! -d src/com/android/email/ ]] ; then @@ -47,13 +46,13 @@ rm -fr src/com/android/exchange/ \ # Step 2. Remove lines surrounded by START-EXCHANGE and END-EXCHANGE find . \( -name '*.java' -o -name '*.xml' -o -name 'Android.mk' \) -print0 | - xargs -0 sed -i -e '/EXCHANGE-REMOVE-SECTION-START/,/EXCHANGE-REMOVE-SECTION-END/d' + xargs -0 sed -i "" -e '/EXCHANGE-REMOVE-SECTION-START/,/EXCHANGE-REMOVE-SECTION-END/d' # Step 3. Remove all imports from com.android.exchange (and its subpackages). find . -name '*.java' -print0 | - xargs -0 sed -i -e '/^import com\.android\.exchange/d' + xargs -0 sed -i "" -e '/^import com\.android\.exchange/d' echo ""