cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject ios commit: CB-7169 Fix __PROECT_NAME__ replacing code in create script
Date Wed, 20 Aug 2014 15:24:27 GMT
Repository: cordova-ios
Updated Branches:
  refs/heads/master 7c1545501 -> f239661e1


CB-7169 Fix __PROECT_NAME__ replacing code in create script

`&` is a special character for `sed` and this fixes the problem of having `__PROJECT_NAME__`
in the final output when the project name contains an ampersand.

github: close #100


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/f239661e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/f239661e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/f239661e

Branch: refs/heads/master
Commit: f239661e1f6c2da3d6353491daa8b45d53a88382
Parents: 7c15455
Author: Lapo Luchini <lapo@lapo.it>
Authored: Fri Jul 18 16:38:10 2014 +0200
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Wed Aug 20 11:23:57 2014 -0400

----------------------------------------------------------------------
 bin/create | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/f239661e/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 90f9ce6..158bea4 100755
--- a/bin/create
+++ b/bin/create
@@ -126,14 +126,15 @@ mv "$R/gitignore" "$R/.gitignore"
 # - ./__PROJECT_NAME__/Resources/__PROJECT_NAME__-info.plist
 # - ./__PROJECT_NAME__/Resources/__PROJECT_NAME__-Prefix.plist
 
-"$BINDIR/replaces" "$R.xcodeproj/project.pbxproj" __PROJECT_NAME__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/Classes/AppDelegate.h"     __PROJECT_NAME__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/Classes/AppDelegate.m"     __PROJECT_NAME__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/Classes/MainViewController.h" __PROJECT_NAME__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/Classes/MainViewController.m" __PROJECT_NAME__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/main.m"                    __PROJECT_NAME__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/$PROJECT_NAME-Info.plist"  __PROJECT_NAME__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/$PROJECT_NAME-Prefix.pch"  __PROJECT_NAME__ "$PROJECT_NAME"
+PROJECT_NAME_ESC="${PROJECT_NAME//&/\\&}"
+"$BINDIR/replaces" "$R.xcodeproj/project.pbxproj" __PROJECT_NAME__ "$PROJECT_NAME_ESC"
+"$BINDIR/replaces" "$R/Classes/AppDelegate.h"     __PROJECT_NAME__ "$PROJECT_NAME_ESC"
+"$BINDIR/replaces" "$R/Classes/AppDelegate.m"     __PROJECT_NAME__ "$PROJECT_NAME_ESC"
+"$BINDIR/replaces" "$R/Classes/MainViewController.h" __PROJECT_NAME__ "$PROJECT_NAME_ESC"
+"$BINDIR/replaces" "$R/Classes/MainViewController.m" __PROJECT_NAME__ "$PROJECT_NAME_ESC"
+"$BINDIR/replaces" "$R/main.m"                    __PROJECT_NAME__ "$PROJECT_NAME_ESC"
+"$BINDIR/replaces" "$R/$PROJECT_NAME-Info.plist"  __PROJECT_NAME__ "$PROJECT_NAME_ESC"
+"$BINDIR/replaces" "$R/$PROJECT_NAME-Prefix.pch"  __PROJECT_NAME__ "$PROJECT_NAME_ESC"
 
 "$BINDIR/replaces" "$R/$PROJECT_NAME-Info.plist" --ID-- $PACKAGE
 


Mime
View raw message