diff options
author | Nate Amundson <naamunds@microsoft.com> | 2016-03-18 03:12:10 +0300 |
---|---|---|
committer | Nate Amundson <naamunds@microsoft.com> | 2016-03-18 03:12:10 +0300 |
commit | fe6ac97e4bf48c9a6ac675e8d567bf1ef2b9c92a (patch) | |
tree | e88b3a9f5859738bab8efd6959e207c4b3d64c7b /clean.sh | |
parent | c7a99312e1f42c43de407dbfd29d42cd67ce5b56 (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-x | clean.sh | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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 |