Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Perez Rodriguez <joperezr@microsoft.com>2016-02-12 01:43:40 +0300
committerJose Perez Rodriguez <joperezr@microsoft.com>2016-02-12 01:52:21 +0300
commit73c60adb1a55169a28ef74f26acf96641fe4bb32 (patch)
treea68ca5c51b1e5d7c168f1f6662425608617ee9c0 /init-tools.sh
parent3798e53640160c67e59eb51bc3bc5556c2733d7e (diff)
Cleaning up the output of init-tools.sh to mimic the cmd equivalent
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-xinit-tools.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/init-tools.sh b/init-tools.sh
index 4e3f171557..322a8803e1 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
+__init_tools_log=$__scriptpath/init-tools.log
__PACKAGES_DIR=$__scriptpath/packages
__TOOLRUNTIME_DIR=$__scriptpath/Tools
__DOTNET_PATH=$__TOOLRUNTIME_DIR/dotnetcli
@@ -42,7 +43,7 @@ esac
if [ ! -e $__PROJECT_JSON_FILE ]; then
if [ -e $__TOOLRUNTIME_DIR ]; then rm -rf -- $__TOOLRUNTIME_DIR; fi
-
+ echo "Running: $__scriptpath/init-tools.sh" > $__init_tools_log
if [ ! -e $__DOTNET_PATH ]; then
echo "Installing dotnet cli..."
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
@@ -65,15 +66,20 @@ if [ ! -e $__PROJECT_JSON_FILE ]; then
cd $__scriptpath
fi
- mkdir "$__PROJECT_JSON_PATH"
+ if [ ! -e "$__PROJECT_JSON_PATH" ]; then mkdir "$__PROJECT_JSON_PATH"; fi
echo $__PROJECT_JSON_CONTENTS > "$__PROJECT_JSON_FILE"
if [ ! -e $__BUILD_TOOLS_PATH ]; then
echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..."
- $__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE
+ echo "Running: $__DOTNET_CMD restore \"$__PROJECT_JSON_FILE\" --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE" >> $__init_tools_log
+ $__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE >> $__init_tools_log
+ if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."; fi
fi
echo "Initializing BuildTools..."
- $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR
+ echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log
+ $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log
echo "Done initializing tools."
+else
+ echo "Tools are already initialized"
fi