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:
authorNate Amundson <naamunds@microsoft.com>2016-03-18 03:12:10 +0300
committerNate Amundson <naamunds@microsoft.com>2016-03-18 03:12:10 +0300
commitfe6ac97e4bf48c9a6ac675e8d567bf1ef2b9c92a (patch)
treee88b3a9f5859738bab8efd6959e207c4b3d64c7b /clean.sh
parentc7a99312e1f42c43de407dbfd29d42cd67ce5b56 (diff)
Minor fixes to clean.sh
clean.sh only needs to call init-tools.sh when it is going to use MSBuild. A corresponding change was made to clean.cmd in https://github.com/dotnet/corefx/commit/fe967b3 Specifying a substring using a negative length is only supported on Bash 4.2 and later. Some machines may have an older version of Bash (e.g. on Mac OS X), so we should avoid using it.
Diffstat (limited to 'clean.sh')
-rwxr-xr-xclean.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/clean.sh b/clean.sh
index 77099dda30..395c6c6110 100755
--- a/clean.sh
+++ b/clean.sh
@@ -75,14 +75,18 @@ do
shift
done
-echo "Running init-tools.sh"
-$WorkingTreeRoot/init-tools.sh
-
if [ -n "$CleanTargets" ]
then
- echo "Running MSBuild target(s): ${CleanTargets:0:-1}"
- echo -e "\n$WorkingTreeRoot/Tools/corerun $WorkingTreeRoot/Tools/MSBuild.exe $WorkingTreeRoot/build.proj /t:${CleanTargets:0:-1} /nologo /verbosity:minimal /flp:v=detailed;Append;LogFile=$CleanLog" >> $CleanLog
- $WorkingTreeRoot/Tools/corerun $WorkingTreeRoot/Tools/MSBuild.exe $WorkingTreeRoot/build.proj /t:${CleanTargets:0:-1} /nologo /verbosity:minimal "/flp:v=detailed;Append;LogFile=$CleanLog"
+ # Ensure that MSBuild is available
+ echo "Running init-tools.sh"
+ $WorkingTreeRoot/init-tools.sh
+
+ # Trim the trailing semicolon from the targets string
+ CleanTargetsTrimmed=${CleanTargets:0:${#CleanTargets}-1}
+
+ echo "Running MSBuild target(s): $CleanTargetsTrimmed"
+ echo -e "\n$WorkingTreeRoot/Tools/corerun $WorkingTreeRoot/Tools/MSBuild.exe $WorkingTreeRoot/build.proj /t:$CleanTargetsTrimmed /nologo /verbosity:minimal /flp:v=detailed;Append;LogFile=$CleanLog" >> $CleanLog
+ $WorkingTreeRoot/Tools/corerun $WorkingTreeRoot/Tools/MSBuild.exe $WorkingTreeRoot/build.proj /t:$CleanTargetsTrimmed /nologo /verbosity:minimal "/flp:v=detailed;Append;LogFile=$CleanLog"
check_exit_status
fi