summaryrefslogtreecommitdiff
path: root/init-tools.sh
diff options
context:
space:
mode:
authorRavi Eda <raeda@microsoft.com>2017-07-13 13:45:52 -0500
committerGitHub <noreply@github.com>2017-07-13 13:45:52 -0500
commit474d2e590d8d16089386444fd7ea9782364bd7cf (patch)
treea42096029f5f908d0818df764f4d73b3c23ee19a /init-tools.sh
parentd24212f68ed2c7f11b9a257c120311bdfe95cc31 (diff)
downloadcoreclr-474d2e590d8d16089386444fd7ea9782364bd7cf.tar.gz
coreclr-474d2e590d8d16089386444fd7ea9782364bd7cf.tar.bz2
coreclr-474d2e590d8d16089386444fd7ea9782364bd7cf.zip
[CoreCLR] Display the contents of init-tools.log (#12795)
* Update attribute-value in security build definition. * Display init-tools log. * Ensure execute permission is available.
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-xinit-tools.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/init-tools.sh b/init-tools.sh
index c076212ab5..4fc52d0107 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -40,6 +40,12 @@ OSName=$(uname -s)
esac
fi
+display_error_message()
+{
+ echo "Please check the detailed log that follows." 1>&2
+ cat "$__init_tools_log" 1>&2
+}
+
if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
__PATCH_CLI_NUGET_FRAMEWORKS=0
@@ -76,7 +82,6 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
fi
fi
-
if [ -n "$BUILD_TOOLS_TOOLSET_DIR" ] && [ -d "$BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION" ]; then
echo "Copying $BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION to $__TOOLRUNTIME_DIR" >> $__init_tools_log
cp -r $BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/* $__TOOLRUNTIME_DIR
@@ -88,7 +93,10 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..."
echo "Running: $__DOTNET_CMD restore \"$__INIT_TOOLS_RESTORE_PROJECT\" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION" >> $__init_tools_log
$__DOTNET_CMD restore "$__INIT_TOOLS_RESTORE_PROJECT" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION >> $__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."1>&2; fi
+ if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then
+ echo "ERROR: Could not restore build tools correctly." 1>&2
+ display_error_message
+ fi
fi
echo "Initializing BuildTools..."
@@ -98,7 +106,8 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
chmod +x $__BUILD_TOOLS_PATH/init-tools.sh
$__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log
if [ "$?" != "0" ]; then
- echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."1>&2
+ echo "ERROR: An error occurred when trying to initialize the tools." 1>&2
+ display_error_message
exit 1
fi
fi
@@ -115,4 +124,4 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
echo "Done initializing tools."
else
echo "Tools are already initialized"
-fi \ No newline at end of file
+fi