Created
June 26, 2015 20:44
-
-
Save jpf91/8a647cb64512ee3b7c2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "$GCC_VERSION" | grep -qP "gcc-[\d\.]+$" | |
# Standard release | |
if [ $? = 0 ] | |
then | |
GCC_TARBALL="releases/${GCC_VERSION}/${GCC_VERSION}.tar.bz2" | |
if [ $(echo "$GCC_VERSION" | cut -c5-5) -gt "4" ] | |
then | |
PATCH_VERSION=$(echo "$GCC_VERSION" | cut -c5-5) | |
# Max supported gcc version in semaphore ci | |
if [ $(echo "$GCC_VERSION" | cut -c5-5) -gt "5" ] | |
then | |
HOST_PACKAGE="5" | |
else | |
HOST_PACKAGE=$(echo "$GCC_VERSION" | cut -c5-5) | |
fi | |
else | |
PATCH_VERSION=$(echo "$GCC_VERSION" | cut -c5-7) | |
HOST_PACKAGE=$(echo "$GCC_VERSION" | cut -c5-7) | |
fi | |
# Snapshot or RC | |
else | |
GCC_TARBALL="snapshots/$(echo "$GCC_VERSION" | cut -c5-)/${GCC_VERSION}.tar.bz2" | |
PATCH_VERSION=$(echo "$GCC_VERSION" | cut -c5-5) | |
HOST_PACKAGE="5" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment