2025-03-01 09:03:39
Some checks are pending
CMake / Windows MSVC Win32 (push) Waiting to run
CMake / Windows MSVC Win64 (push) Waiting to run
CMake / Windows GCC (push) Waiting to run
CMake / Ubuntu GCC -O3 (push) Waiting to run
CMake / Ubuntu GCC OSB (push) Waiting to run
CMake / Ubuntu Clang Debug (push) Waiting to run
CMake / Ubuntu Clang (push) Waiting to run
CMake / macOS Clang (push) Waiting to run
CMake / Ubuntu GCC (push) Waiting to run
CMake / macOS GCC (push) Waiting to run
Configure / Ubuntu GCC PPC (push) Waiting to run
Configure / Ubuntu GCC PPC64 (push) Waiting to run
Configure / Ubuntu GCC S390X (push) Waiting to run
Configure / Ubuntu GCC OSB (push) Waiting to run
Configure / Ubuntu GCC AARCH64 (push) Waiting to run
Configure / Ubuntu GCC ARM SF (push) Waiting to run
Configure / Ubuntu GCC ARM HF (push) Waiting to run
Configure / macOS Clang (push) Waiting to run
Configure / Ubuntu GCC (push) Waiting to run
Configure / macOS GCC (push) Waiting to run
Configure / Ubuntu GCC PPC64LE (push) Waiting to run
Some checks are pending
CMake / Windows MSVC Win32 (push) Waiting to run
CMake / Windows MSVC Win64 (push) Waiting to run
CMake / Windows GCC (push) Waiting to run
CMake / Ubuntu GCC -O3 (push) Waiting to run
CMake / Ubuntu GCC OSB (push) Waiting to run
CMake / Ubuntu Clang Debug (push) Waiting to run
CMake / Ubuntu Clang (push) Waiting to run
CMake / macOS Clang (push) Waiting to run
CMake / Ubuntu GCC (push) Waiting to run
CMake / macOS GCC (push) Waiting to run
Configure / Ubuntu GCC PPC (push) Waiting to run
Configure / Ubuntu GCC PPC64 (push) Waiting to run
Configure / Ubuntu GCC S390X (push) Waiting to run
Configure / Ubuntu GCC OSB (push) Waiting to run
Configure / Ubuntu GCC AARCH64 (push) Waiting to run
Configure / Ubuntu GCC ARM SF (push) Waiting to run
Configure / Ubuntu GCC ARM HF (push) Waiting to run
Configure / macOS Clang (push) Waiting to run
Configure / Ubuntu GCC (push) Waiting to run
Configure / macOS GCC (push) Waiting to run
Configure / Ubuntu GCC PPC64LE (push) Waiting to run
This commit is contained in:
parent
14f4ad986c
commit
555d95f198
2 changed files with 440 additions and 0 deletions
416
scripts/build/build.sh
Executable file
416
scripts/build/build.sh
Executable file
|
@ -0,0 +1,416 @@
|
|||
#!/bin/bash
|
||||
################################################################################
|
||||
# Intended use: Compile and extract software packages
|
||||
#
|
||||
# Notes: This script support Linux Bash shell script only
|
||||
# Install Bash from https://www.gnu.org/software/bash/
|
||||
#
|
||||
# Copyright (C) 2015 - 2023, VGISC Dev Team <dev@vgisc.com>
|
||||
################################################################################
|
||||
|
||||
# Source path
|
||||
export SCRIPT=$(readlink -f "$0")
|
||||
export SCRIPT_PATH=$(dirname "$SCRIPT")
|
||||
export SRC_DIR=${SCRIPT_PATH}/../..
|
||||
export APP_NAME=$(basename $(dirname $(dirname "${SCRIPT_PATH}")))
|
||||
|
||||
# Declare input
|
||||
ARCH_BUILD=$1
|
||||
INSTALL_DIR=$2
|
||||
export BUILD_TYPE=all
|
||||
|
||||
# *********************************************************************
|
||||
# Function: print_help
|
||||
# - Print: Help
|
||||
# *********************************************************************
|
||||
print_help ()
|
||||
{
|
||||
# Print
|
||||
echo -e ""
|
||||
echo -e "Syntax: build.sh <arch> <install_dir>"
|
||||
echo -e "<arch>: Arch of device hardware. Only support"
|
||||
echo -e " linux-x86_64 Linux AMD 64 bit general plaform"
|
||||
echo -e " arm-linux-gnueabi Linux ARM 32 bit for gnueabi general platform"
|
||||
echo -e " arm-linux-gnueabihf Linux ARM 32 bit for gnueabihf general platform"
|
||||
echo -e " aarch64-linux-gnu Linux ARM 64 bit for general platform"
|
||||
echo -e " powerpc-linux-gnu Linux PPC 32 bit for general platform"
|
||||
echo -e " powerpc64-linux-gnu Linux PPC 64 bit big endian for general platform"
|
||||
echo -e " powerpc64le-linux-gnu Linux PPC 64 bit little endian for general platform"
|
||||
echo -e " arm-linux-gnueabihf-xilinx Linux ARM 32 bit for Xilinx platform"
|
||||
echo -e " aarch64-linux-gnu-xilinx Linux ARM 64 bit for Xilinx platform"
|
||||
echo -e " powerpc64-fsl-linux Linux PowerPC 64 bit for NXP QorIQ platform"
|
||||
echo -e " i686-w64-mingw32 Windows AMD 32 bit platform"
|
||||
echo -e " x86_64-w64-mingw32 Windows AMD 64 bit platform"
|
||||
echo -e " arm-openwrt-linux Linux for OpenWRT Kirkwood platform"
|
||||
echo -e "<install_dir>: The target directory contains the built results."
|
||||
echo -e " The built results will be placed in the directory"
|
||||
echo -e " <install_dir>/<arch>/opt/vgisc/usr/"
|
||||
echo -e " If value a is not provided, the default output directory is"
|
||||
echo -e " /opt/vgisc/6t/workspace/BUILD/"
|
||||
echo -e ""
|
||||
echo -e "Example:"
|
||||
echo -e "- Example: build.sh arm-linux-gnueabihf /opt/vgisc/6t/workspace/BUILD"
|
||||
echo -e "- Example: build.sh \"linux-x86_64\""
|
||||
echo -e ""
|
||||
}
|
||||
|
||||
# Validate input
|
||||
if [[ -z $ARCH_BUILD ]]; then
|
||||
echo -e "You must enter enough information. Cannot execute the command."
|
||||
print_help
|
||||
exit
|
||||
fi
|
||||
|
||||
# Variables
|
||||
item_exists="0"
|
||||
names=("linux-x86_64" \
|
||||
"arm-linux-gnueabi" \
|
||||
"arm-linux-gnueabihf" \
|
||||
"aarch64-linux-gnu" \
|
||||
"powerpc-linux-gnu" \
|
||||
"powerpc64-linux-gnu" \
|
||||
"powerpc64le-linux-gnu" \
|
||||
"arm-linux-gnueabihf-xilinx" \
|
||||
"aarch64-linux-gnu-xilinx" \
|
||||
"powerpc64-fsl-linux" \
|
||||
"i686-w64-mingw32" \
|
||||
"x86_64-w64-mingw32" \
|
||||
"arm-openwrt-linux")
|
||||
for item in ${names[@]}; do
|
||||
if [[ "${item}" = "${ARCH_BUILD}" ]]; then
|
||||
item_exists="1"
|
||||
fi
|
||||
done
|
||||
if [[ "$item_exists" == "0" ]]; then
|
||||
echo -e "The build arch is invalid. Cannot execute the command."
|
||||
echo -e "Build arch must be in supported list."
|
||||
print_help
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ -z $INSTALL_DIR ]]; then
|
||||
echo -e "<install_dir> value a is not provided, the default output directory is"
|
||||
echo -e " /opt/vgisc/6t/workspace/BUILD/"
|
||||
export INSTALL_DIR="/opt/vgisc/6t/workspace/BUILD/"
|
||||
fi
|
||||
|
||||
if [[ ! -d $INSTALL_DIR ]]; then
|
||||
echo -e "Folder $INSTALL_DIR does not exist, please create this folder first."
|
||||
print_help
|
||||
exit
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "==========================================================================="
|
||||
echo "Build ${APP_NAME} for platform ${ARCH_BUILD}"
|
||||
echo "Build type: ${BUILD_TYPE}"
|
||||
echo "=========================================================================="
|
||||
|
||||
echo "=> Setting up the build environment for ${ARCH_BUILD}..."
|
||||
unset LD_LIBRARY_PATH
|
||||
|
||||
case "${ARCH_BUILD}" in
|
||||
linux-x86_64)
|
||||
export OS=linux
|
||||
export ARCH=x86_64
|
||||
;;
|
||||
arm-linux-gnueabi)
|
||||
export OS=linux
|
||||
export ARCH=arm32
|
||||
;;
|
||||
arm-linux-gnueabihf)
|
||||
export OS=linux
|
||||
export ARCH=arm32
|
||||
;;
|
||||
aarch64-linux-gnu)
|
||||
export OS=linux
|
||||
export ARCH=arm64
|
||||
;;
|
||||
powerpc-linux-gnu)
|
||||
export OS=linux
|
||||
export ARCH=ppc32
|
||||
;;
|
||||
powerpc64-linux-gnu)
|
||||
export OS=linux
|
||||
export ARCH=ppc64
|
||||
;;
|
||||
powerpc64le-linux-gnu)
|
||||
export OS=linux
|
||||
export ARCH=ppc64
|
||||
;;
|
||||
arm-linux-gnueabihf-xilinx)
|
||||
export PATH="/opt/Xilinx/arm-buildroot-linux-gnueabihf_sdk/bin:$PATH"
|
||||
export SYS_ROOT=/opt/Xilinx/arm-buildroot-linux-gnueabihf_sdk/usr/arm-buildroot-linux-gnueabihf/sysroot/usr
|
||||
export OS=linux
|
||||
export ARCH=arm32
|
||||
;;
|
||||
aarch64-linux-gnu-xilinx)
|
||||
export PATH="/opt/Xilinx/aarch64-buildroot-linux-gnu_sdk/bin:$PATH"
|
||||
export SYS_ROOT=/opt/Xilinx/aarch64-buildroot-linux-gnu_sdk/usr/aarch64-buildroot-linux-gnu/sysroot/usr
|
||||
export OS=linux
|
||||
export ARCH=arm64
|
||||
;;
|
||||
powerpc64-fsl-linux)
|
||||
. /opt/fsl-qoriq/3.0/environment-setup-ppc64e6500-fsl-linux
|
||||
export SYSROOT_ALT=/opt/fsl-qoriq/3.0/sysroots/ppc64e6500-fsl-linux/usr
|
||||
export OS=linux
|
||||
export ARCH=ppc64
|
||||
;;
|
||||
arm-openwrt-linux)
|
||||
export PATH="/opt/openwrt/arm_xscale_gcc-11.2.0_musl_eabi/bin:$PATH"
|
||||
export SYS_ROOT=/opt/openwrt/arm_xscale_gcc-11.2.0_musl_eabi
|
||||
export STAGING_DIR=/opt/openwrt/
|
||||
export OS=linux
|
||||
export ARCH=arm32
|
||||
;;
|
||||
i686-w64-mingw32)
|
||||
export OS=windows
|
||||
export ARCH=mingw32
|
||||
;;
|
||||
x86_64-w64-mingw32)
|
||||
export OS=windows
|
||||
export ARCH=mingw64
|
||||
;;
|
||||
*)
|
||||
echo "The build environment cannot be determined. Exit"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${ARCH_BUILD}" in
|
||||
linux-x86_64)
|
||||
export CC=gcc
|
||||
export LD=ld
|
||||
export RANLIB=ranlib
|
||||
export AR=ar
|
||||
export STRIP=strip
|
||||
|
||||
gcc_bin="$(which gcc)"
|
||||
if [[ ! -f "${gcc_bin}" ]]; then
|
||||
echo -e "GCC compiler for ${ARCH_BUILD} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
gpp_bin=$(which g++)
|
||||
if [[ ! -f "${gpp_bin}" ]]; then
|
||||
echo -e "G++ compiler for ${ARCH_BUILD} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
arm-linux-gnueabihf-xilinx)
|
||||
export ARM_XILINX=arm-linux-gnueabihf
|
||||
export TARGET=${ARM_XILINX}
|
||||
export HOST=${ARM_XILINX}
|
||||
export CC=${ARM_XILINX}-gcc
|
||||
export LD=${ARM_XILINX}-ld
|
||||
export RANLIB=${ARM_XILINX}-ranlib
|
||||
export AR=${ARM_XILINX}-ar
|
||||
export STRIP=${ARM_XILINX}-strip
|
||||
|
||||
gcc_bin="$(which ${ARM_XILINX}-gcc)"
|
||||
if [[ ! -f "${gcc_bin}" ]]; then
|
||||
echo -e "GCC compiler for ${ARM_XILINX} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
gpp_bin=$(which ${ARM_XILINX}-g++)
|
||||
if [[ ! -f "${gpp_bin}" ]]; then
|
||||
echo -e "G++ compiler for ${ARM_XILINX} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
aarch64-linux-gnu-xilinx)
|
||||
export AARCH64_XILINX=aarch64-linux-gnu
|
||||
export TARGET=${AARCH64_XILINX}
|
||||
export HOST=${AARCH64_XILINX}
|
||||
export CC=${AARCH64_XILINX}-gcc
|
||||
export LD=${AARCH64_XILINX}-ld
|
||||
export RANLIB=${AARCH64_XILINX}-ranlib
|
||||
export AR=${AARCH64_XILINX}-ar
|
||||
export STRIP=${AARCH64_XILINX}-strip
|
||||
|
||||
gcc_bin="$(which ${AARCH64_XILINX}-gcc)"
|
||||
if [[ ! -f "${gcc_bin}" ]]; then
|
||||
echo -e "GCC compiler for ${AARCH64_XILINX} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
gpp_bin=$(which ${AARCH64_XILINX}-g++)
|
||||
if [[ ! -f "${gpp_bin}" ]]; then
|
||||
echo -e "G++ compiler for ${AARCH64_XILINX} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
powerpc64-fsl-linux)
|
||||
export TARGET=powerpc64-fsl-linux
|
||||
export HOST=powerpc64-fsl-linux
|
||||
export STRIP=powerpc64-fsl-linux-strip
|
||||
|
||||
gcc_bin="$(which ${ARCH_BUILD}-gcc)"
|
||||
if [[ ! -f "${gcc_bin}" ]]; then
|
||||
echo -e "GCC compiler for ${ARCH_BUILD} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
gpp_bin=$(which ${ARCH_BUILD}-g++)
|
||||
if [[ ! -f "${gpp_bin}" ]]; then
|
||||
echo -e "G++ compiler for ${ARCH_BUILD} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
export TARGET=${ARCH_BUILD}
|
||||
export HOST=${ARCH_BUILD}
|
||||
export CC=${ARCH_BUILD}-gcc
|
||||
export LD=${ARCH_BUILD}-ld
|
||||
export RANLIB=${ARCH_BUILD}-ranlib
|
||||
export AR=${ARCH_BUILD}-ar
|
||||
export STRIP=${ARCH_BUILD}-strip
|
||||
|
||||
gcc_bin="$(which ${ARCH_BUILD}-gcc)"
|
||||
if [[ ! -f "${gcc_bin}" ]]; then
|
||||
echo -e "GCC compiler for ${ARCH_BUILD} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
gpp_bin=$(which ${ARCH_BUILD}-g++)
|
||||
if [[ ! -f "${gpp_bin}" ]]; then
|
||||
echo -e "G++ compiler for ${ARCH_BUILD} does not exist. Exit."
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Output path
|
||||
export PREFIX=/opt/vgisc/usr
|
||||
export THIRD_PARTY_PREFIX=/opt/third_party
|
||||
export OUTPUT_DIR=output/${APP_NAME}-${ARCH_BUILD}-${BUILD_TYPE}
|
||||
export ZIP_DIR=${INSTALL_DIR}/zip
|
||||
export RELEASE_DIR=${INSTALL_DIR}/rls/${ARCH_BUILD}/release
|
||||
export STATIC_DIR=${INSTALL_DIR}/rls/${ARCH_BUILD}/static
|
||||
export DYNAMIC_DIR=${INSTALL_DIR}/rls/${ARCH_BUILD}/dynamic
|
||||
export BOOT_DIR=${INSTALL_DIR}/rls/${ARCH_BUILD}/boot
|
||||
export INSTALLERS_DIR=${INSTALL_DIR}/installers
|
||||
|
||||
echo ""
|
||||
echo "=> Change to source directory: ${SRC_DIR}/"
|
||||
cd ${SRC_DIR}
|
||||
|
||||
echo ""
|
||||
echo "=> Clean output and old build"
|
||||
make clean
|
||||
make distclean
|
||||
rm -rf ${SRC_DIR}/${OUTPUT_DIR}
|
||||
rm -rf ${SRC_DIR}/${OUTPUT_DIR}.tar.gz
|
||||
|
||||
echo ""
|
||||
echo "=> Building in source tree: ${SRC_DIR}/..."
|
||||
export CROSS_COMPILE=
|
||||
case "${ARCH_BUILD}" in
|
||||
linux-x86_64)
|
||||
./configure --prefix=${PREFIX} \
|
||||
CFLAGS="-DLVC_MKC4B_READ_TABLES \
|
||||
-DLVC_MKC3_READ_TABLES \
|
||||
-DLVC_USE_XML_FILE \
|
||||
-DLVC_MKC3_DEBUG=0 \
|
||||
-DLVC_MKC4B_DEBUG=0 \
|
||||
-DLVC_CORE_DEBUG=0 \
|
||||
-DLVC_UTIL_DEBUG=0 \
|
||||
-DLVC_SHA2_DEBUG=0 \
|
||||
-DLVC_HMAC_SHA2_DEBUG=0 \
|
||||
-DLVC_HDRBG_DEBUG=0 \
|
||||
-DLVC_PBKDF2_DEBUG=0 \
|
||||
-DLVC_SYSTEM_RNG_DEBUG=0"
|
||||
;;
|
||||
*)
|
||||
./configure --prefix=${PREFIX} \
|
||||
--host=${HOST} \
|
||||
CFLAGS="-DLVC_MKC4B_READ_TABLES \
|
||||
-DLVC_MKC3_READ_TABLES \
|
||||
-DLVC_USE_XML_FILE \
|
||||
-DLVC_MKC3_DEBUG=0 \
|
||||
-DLVC_MKC4B_DEBUG=0 \
|
||||
-DLVC_CORE_DEBUG=0 \
|
||||
-DLVC_UTIL_DEBUG=0 \
|
||||
-DLVC_SHA2_DEBUG=0 \
|
||||
-DLVC_HMAC_SHA2_DEBUG=0 \
|
||||
-DLVC_HDRBG_DEBUG=0 \
|
||||
-DLVC_PBKDF2_DEBUG=0 \
|
||||
-DLVC_SYSTEM_RNG_DEBUG=0"
|
||||
;;
|
||||
esac
|
||||
|
||||
make
|
||||
make BUILDROOT=${SRC_DIR}/${OUTPUT_DIR} install all
|
||||
|
||||
# Build util
|
||||
export UTIL_SRC_DIR=${SRC_DIR}/utils/src
|
||||
export UTIL_BIN_DIR=${SRC_DIR}/${OUTPUT_DIR}${PREFIX}/utils
|
||||
export CFLAGS="-I${STATIC_DIR}${PREFIX}/include" \
|
||||
export LDFLAGS="-L${STATIC_DIR}${PREFIX}/lib -lvcrypt"
|
||||
mkdir -p ${UTIL_BIN_DIR}
|
||||
|
||||
echo ""
|
||||
echo "=> Building utils in source directory: ${UTIL_SRC_DIR}/..."
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_base64.c \
|
||||
-o ${UTIL_BIN_DIR}/util_base64 -lvcrypt
|
||||
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_mkc4b_write_tables_to_file.c \
|
||||
-o ${UTIL_BIN_DIR}/util_mkc4b_write_tables_to_file -lvcrypt
|
||||
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_mkc4b_encrypt_encode_file.c \
|
||||
-o ${UTIL_BIN_DIR}/util_mkc4b_encrypt_encode_file -lvcrypt
|
||||
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_mkc4b_encrypt_file.c \
|
||||
-o ${UTIL_BIN_DIR}/util_mkc4b_encrypt_file -lvcrypt
|
||||
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_hdrbg_gen_bytes.c \
|
||||
-o ${UTIL_BIN_DIR}/util_hdrbg_gen_bytes -lvcrypt
|
||||
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_system_rng_get_bytes.c \
|
||||
-o ${UTIL_BIN_DIR}/util_system_rng_get_bytes -lvcrypt
|
||||
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_dh_params_to_file.c \
|
||||
-o ${UTIL_BIN_DIR}/util_dh_params_to_file -lvcrypt
|
||||
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_ffdhv_params_to_file.c \
|
||||
-o ${UTIL_BIN_DIR}/util_ffdhv_params_to_file -lvcrypt
|
||||
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${UTIL_SRC_DIR}/util_secv_params_to_file.c \
|
||||
-o ${UTIL_BIN_DIR}/util_secv_params_to_file -lvcrypt
|
||||
|
||||
echo ""
|
||||
echo "=> Make output tar.gz file: ${SRC_DIR}/${OUTPUT_DIR}.tar.gz"
|
||||
rm -rf ${SRC_DIR}/${OUTPUT_DIR}.tar.gz
|
||||
tar -zcvf ${SRC_DIR}/${OUTPUT_DIR}.tar.gz ${SRC_DIR}/${OUTPUT_DIR}/
|
||||
|
||||
echo ""
|
||||
echo "=> Copy output to release directory: ${RELEASE_DIR}${PREFIX}/"
|
||||
mkdir -p ${RELEASE_DIR}
|
||||
cp -rf ${SRC_DIR}/${OUTPUT_DIR}/* ${RELEASE_DIR}/
|
||||
|
||||
echo ""
|
||||
echo "=> Copy output to dynamic directory: ${DYNAMIC_DIR}${PREFIX}/"
|
||||
mkdir -p ${DYNAMIC_DIR}
|
||||
cp -rf ${SRC_DIR}/${OUTPUT_DIR}/* ${DYNAMIC_DIR}/
|
||||
rm -rf ${DYNAMIC_DIR}${PREFIX}/lib/*.a
|
||||
|
||||
echo ""
|
||||
echo "=> Copy output to static directory: ${STATIC_DIR}${PREFIX}/"
|
||||
mkdir -p ${STATIC_DIR}
|
||||
cp -rf ${SRC_DIR}/${OUTPUT_DIR}/* ${STATIC_DIR}/
|
||||
rm -rf ${STATIC_DIR}${PREFIX}/lib/*.so*
|
||||
|
||||
echo ""
|
||||
echo "=> Copy output ${OUTPUT_DIR}.tar.gz to compress directory: ${ZIP_DIR}/"
|
||||
mkdir -p ${ZIP_DIR}/
|
||||
cp -rf ${SRC_DIR}/${OUTPUT_DIR}.tar.gz ${ZIP_DIR}/
|
||||
|
||||
echo ""
|
||||
echo "=> Clean the build"
|
||||
make clean
|
||||
make distclean
|
||||
rm -rf ${SRC_DIR}/${OUTPUT_DIR}
|
||||
rm -rf ${SRC_DIR}/${OUTPUT_DIR}.tar.gz
|
||||
|
||||
echo ""
|
||||
echo "=> Done."
|
||||
echo ""
|
||||
################################################################################
|
||||
# BASH SCRIPT ON LINUX/UNIX - END
|
||||
################################################################################
|
24
scripts/util/util_git_release.sh
Executable file
24
scripts/util/util_git_release.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
################################################################################
|
||||
# BASH SCRIPT ON LINUX/UNIX - BEGIN
|
||||
################################################################################
|
||||
#!/bin/bash
|
||||
|
||||
export GIT_BRACNH="master"
|
||||
export GIT_TAG="v1.3.1"
|
||||
|
||||
export TIMESTAMP=`date +"%Y-%m-%d %H:%M:%S"`
|
||||
export SCRIPT=$(readlink -f "$0")
|
||||
export SCRIPT_PATH=$(dirname "$SCRIPT")
|
||||
export SRC_DIR=${SCRIPT_PATH}/../..
|
||||
|
||||
cd ${SRC_DIR}
|
||||
git add .
|
||||
git checkout ${GIT_BRACNH}
|
||||
git commit -m "${TIMESTAMP}"
|
||||
git tag -d ${GIT_TAG}
|
||||
git push origin :refs/tags/${GIT_TAG}
|
||||
git tag -a ${GIT_TAG} -m ${GIT_TAG}
|
||||
git push --tags
|
||||
################################################################################
|
||||
# BASH SCRIPT ON LINUX/UNIX - END
|
||||
################################################################################
|
Loading…
Add table
Add a link
Reference in a new issue