From 4b770714bd968f656e7df24ba951f6256b40f0ac Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Tue, 6 Apr 2010 12:54:23 -0700 Subject: [PATCH] Update starter task to include version of bootstrap which installs Cappuccino packages. --- Jakefile | 4 +++- bootstrap.sh | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Jakefile b/Jakefile index e76760450..d90e5989b 100644 --- a/Jakefile +++ b/Jakefile @@ -145,7 +145,9 @@ filedir ($STARTER_DOWNLOAD_README, [$STARTER_README], function() filedir ($STARTER_DOWNLOAD_BOOTSTRAP, [$STARTER_BOOTSTRAP], function() { - cp($STARTER_BOOTSTRAP, $STARTER_DOWNLOAD_BOOTSTRAP); + var bootstrap = FILE.read($STARTER_BOOTSTRAP, { charset : "UTF-8" }).replace('install_capp=""', 'install_capp="yes"'); + FILE.write($STARTER_DOWNLOAD_BOOTSTRAP, bootstrap, { charset : "UTF-8" }); + OS.system(["chmod", "+x", $STARTER_DOWNLOAD_BOOTSTRAP]); }); // Deployment diff --git a/bootstrap.sh b/bootstrap.sh index 07e821a8a..94ea33d21 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -118,6 +118,7 @@ github_ref="master" tusk_install_command="install" noprompt="" +install_capp="" while [ $# -gt 0 ]; do case "$1" in @@ -126,6 +127,7 @@ while [ $# -gt 0 ]; do --clone) tusk_install_command="clone";; --github-user) github_user="$2"; shift;; --github-ref) github_ref="$2"; shift;; + --install-capp) install_capp="yes";; *) cat >&2 <<-EOT usage: ./bootstrap.sh [OPTIONS] @@ -134,6 +136,7 @@ usage: ./bootstrap.sh [OPTIONS] --clone: Do "git clone" instead of downloading zips. --github-user [USER]: Use another github user (default: 280north). --github-ref [REF]: Use another git ref (default: master). + --install-capp: Install "objective-j" and "cappuccino" packages. EOT exit 1;; esac @@ -263,10 +266,13 @@ fi # echo "================================================================================" # echo "Would you like to install the pre-built Objective-J and Cappuccino packages?" # echo "If you intend to build Cappuccino yourself this is not neccessary." -# extra_packages="" -# if prompt; then -# extra_packages="objective-j cappuccino" +# if [ ! "$install_capp" ] && prompt; then +# install_capp="yes" # fi +extra_packages="" +if [ "$install_capp" ]; then + extra_packages="objective-j cappuccino" +fi echo "Installing necessary packages..."