Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.