[Toolchain] Archive versioning
Allow toolchain builder to add a suffix to toolchain name. It is useful for rebuilding the same toolchain in different environment. (cherry picked from commit 83148fc5bb4e8bcc5afcf119df53ec1bc854be17)
This commit is contained in:
@@ -4,6 +4,7 @@ set -eou pipefail
|
||||
|
||||
TARGET=$1
|
||||
VERSION=$2
|
||||
TOOLCHAIN_VERSION_SUFFIX=$3
|
||||
HOME=/home/ct
|
||||
ZLIB_VERSION=1.2.11
|
||||
|
||||
@@ -33,7 +34,12 @@ build_zlib() {
|
||||
|
||||
build_archive() {
|
||||
cd $HOME/x-tools
|
||||
FULL_NAME=$TARGET-$VERSION
|
||||
if [ -z "$TOOLCHAIN_VERSION_SUFFIX" ]
|
||||
then
|
||||
FULL_NAME="$TARGET-$VERSION"
|
||||
else
|
||||
FULL_NAME="$TARGET-$VERSION-$TOOLCHAIN_VERSION_SUFFIX"
|
||||
fi
|
||||
mv "$TARGET" "$FULL_NAME"
|
||||
ARCHIVE_NAME="$FULL_NAME.tar.gz"
|
||||
tar -czvf "$ARCHIVE_NAME" "$FULL_NAME"
|
||||
|
||||
Reference in New Issue
Block a user