Skip to content

Fix installation on cygwin #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions install-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ initArch() {

# initOS discovers the operating system for this system.
initOS() {
OS=$(uname | tr '[:upper:]' '[:lower:]')
OS=$(uname -s)

case "$OS" in
# Msys support
msys*) OS='windows' ;;
MSYS*) OS='windows' ;;
# Minimalist GNU for Windows
mingw*) OS='windows' ;;
darwin) OS='macos' ;;
MINGW*) OS='windows' ;;
CYGWIN*) OS='windows' ;;
Darwin) OS='macos' ;;
Linux) OS='linux' ;;
esac
}

Expand Down Expand Up @@ -108,18 +110,18 @@ downloadFile() {
if
command -v curl >/dev/null 2>&1
then
curl -L "$DOWNLOAD_URL" -o "$PLUGIN_TMP_FILE"
curl -sSf -L "$DOWNLOAD_URL" >"$PLUGIN_TMP_FILE"
elif
command -v wget >/dev/null 2>&1
then
wget -q -O "$PLUGIN_TMP_FILE" "$DOWNLOAD_URL"
wget -q -O - "$DOWNLOAD_URL" >"$PLUGIN_TMP_FILE"
fi
}

# installFile verifies the SHA256 for the file, then unpacks and
# installs it.
installFile() {
tar xvzf "$PLUGIN_TMP_FILE" -C "$HELM_TMP"
tar xzf "$PLUGIN_TMP_FILE" -C "$HELM_TMP"
HELM_TMP_BIN="$HELM_TMP/diff/bin/diff"
echo "Preparing to install into ${HELM_PLUGIN_DIR}"
mkdir -p "$HELM_PLUGIN_DIR/bin"
Expand Down