Skip to content

Instantly share code, notes, and snippets.

@lulu-berlin
Created October 4, 2015 19:58
Show Gist options
  • Save lulu-berlin/b4ec77d2c051de5da222 to your computer and use it in GitHub Desktop.
Save lulu-berlin/b4ec77d2c051de5da222 to your computer and use it in GitHub Desktop.
A shell script for Cygwin to download and run the install program
#!/bin/bash
if [[ $(getconf LONG_BIT) == "64" ]]; then
setup_file="setup-x86_64.exe"
else
setup_file="setup-x86.exe"
fi
wget -N "https://cygwin.com/$setup_file" -P /usr/local/bin
if [[ $? != 0 ]]; then
echo "Cannot download Cygwin setup. Aborting."
exit $?
else
chmod +x "/usr/local/bin/$setup_file"
${setup_file}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment