From a664aba2c93abd51a7f2c737ea23c351056690be Mon Sep 17 00:00:00 2001 From: gary-b Date: Fri, 21 Oct 2016 01:57:25 +0100 Subject: [PATCH] build: ensure necessary symlinks created on windows Bash scripts create and tear down symlinks on Windows. These use the packages.txt file as input to identify the symlink locations. The scripts ignored the last line in packages.txt if it didn't end with a newline. Also, one location was missing. Resolve both issues. Closes #12422 --- scripts/windows/create-symlinks.sh | 4 ++-- scripts/windows/packages.txt | 1 + scripts/windows/remove-symlinks.sh | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/windows/create-symlinks.sh b/scripts/windows/create-symlinks.sh index c8f4c5a650..2e4c68ac29 100644 --- a/scripts/windows/create-symlinks.sh +++ b/scripts/windows/create-symlinks.sh @@ -2,9 +2,9 @@ cd `dirname $0` -while read RAW_PACKAGE +while read RAW_PACKAGE || [[ -n "$RAW_PACKAGE" ]] do - PACKAGE=${RAW_PACKAGE: : -1} + PACKAGE=${RAW_PACKAGE%$'\r'} DESTDIR=./../../modules/\@angular/${PACKAGE} mv ${DESTDIR}/facade ${DESTDIR}/facade.old cmd <<< "mklink \"..\\..\\modules\\\@angular\\"${PACKAGE}"\\facade\" \"..\\..\\facade\\src\\\"" diff --git a/scripts/windows/packages.txt b/scripts/windows/packages.txt index 7b758d3ff6..5ae2ead0f4 100644 --- a/scripts/windows/packages.txt +++ b/scripts/windows/packages.txt @@ -1,3 +1,4 @@ +benchpress/src common/src compiler/src compiler/testing diff --git a/scripts/windows/remove-symlinks.sh b/scripts/windows/remove-symlinks.sh index f97dfc62f0..cb0380308a 100644 --- a/scripts/windows/remove-symlinks.sh +++ b/scripts/windows/remove-symlinks.sh @@ -2,9 +2,9 @@ cd `dirname $0` -while read RAW_PACKAGE +while read RAW_PACKAGE || [[ -n "$RAW_PACKAGE" ]] do - PACKAGE=${RAW_PACKAGE: : -1} + PACKAGE=${RAW_PACKAGE%$'\r'} DESTDIR=./../../modules/\@angular/${PACKAGE} rm ${DESTDIR}/facade mv ${DESTDIR}/facade.old ${DESTDIR}/facade