Skip to content

Commit

Permalink
G2-338 Fixed cygwin install for multiple packages
Browse files Browse the repository at this point in the history
  • Loading branch information
gdgib committed Apr 12, 2019
1 parent 3a2c8f4 commit 07f1a6f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions builtin/package/Cygwin/install
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ if [ ${#PACKAGES_CYGWIN[@]} -ne 0 ]; then
curl https://cygwin.com/${EXECUTABLE_NAME} -o ${EXECUTABLE_FILE}
chmod +x ${EXECUTABLE_FILE}
fi
echo -e "${CFMT_INFO}Intalling ${PACKAGES_CYGWIN[@]} using cygwin installer ${CFMT_NORMAL}" >&2
PACKAGELIST=$(IFS=,; echo "${PACKAGES_CYGWIN[*]}")
echo -e "${CFMT_INFO}Intalling ${PACKAGELIST} using cygwin installer ${CFMT_NORMAL}" >&2
echo -e "${CFMT_INFO}Be prepared for a UAC password prompt.${CFMT_NORMAL}" >&2
echo -e "${CFMT_INFO}You may need to press <ENTER> in the powershell window once the installer completes!${CFMT_NORMAL}" >&2
sleep 2

PS1_TEMPDIR=$(mktemp -d)
trap "{ rm -rf ${PS1_TEMPDIR}; }" EXIT
cat > ${PS1_TEMPDIR}/install.ps1 <<EOF
\$ErrorActionPreference = "Stop"
$(cygpath -w ${EXECUTABLE_FILE}) -q -W -P ${PACKAGES_CYGWIN[@]}
$(cygpath -w ${EXECUTABLE_FILE}) -q -W -P ${PACKAGELIST}
pause
EOF
# Use powershell to run the installer
Expand Down

0 comments on commit 07f1a6f

Please sign in to comment.