guowenxue
2022-04-08 ed66fa90f8ddec03b1f535613358cb5951f180a7
update x86 build shell script
2 files modified
52 ■■■■ changed files
3rdparty/x86/appweb/build.sh 4 ●●● patch | view | raw | blame | history
3rdparty/x86/build.sh 48 ●●●● patch | view | raw | blame | history
3rdparty/x86/appweb/build.sh
@@ -17,9 +17,7 @@
mkdir -p $PREFIX_PATH/{bin,modules}
if [ "$CROSS_COMPILE" = "yes" ] ; then
    CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
fi
CROSSTOOL=arm-linux-gnueabihf-
function msg_banner()
{
3rdparty/x86/build.sh
@@ -1,15 +1,43 @@
#!/bin/bash
ARCH=`uname -m`
CROSSTOOL=arm-linux-gnueabihf-
echo ${ARCH} | grep "x86" > /dev/null
if [ $? != 0 ] ; then
   echo "+---------------------------------------------------+"
   echo "|   ERROR: This folder must compile on X86 server   |";
   echo "+---------------------------------------------------+"
   exit 1;
fi
# display in red
function pr_error() {
    echo ""
    echo -e "\033[40;31m --E-- $1 \033[0m"
    echo ""
}
# display in yellow
function pr_warn() {
    echo ""
    echo -e "\033[40;33m --W-- $1 \033[0m"
    echo ""
}
# display in green
function pr_info() {
    echo -e "\033[40;32m --I-- $1 \033[0m"
}
function check_depend()
{
    ARCH=`uname -m`
    echo ${ARCH} | grep "x86" > /dev/null
    if [ $? != 0 ] ; then
       pr_error  "This folder must compile on X86 server ";
       exit 1;
    fi
    ${CROSSTOOL}g++ -v > /dev/null 2>&1
    if [ $? != 0 ] ; then
        pr_error "Crosstool not installed, please install it by follow command:"
        pr_info  "sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf"
        exit 1;
    fi
}
function do_compile
{
@@ -37,11 +65,13 @@
    rm -rf install
}
if [[ $# == 1 ]] && [[ $1 == "clean" ]] ; then
if [[ $# == 1 ]] && [[ $1 == "clean" ]] ; then
    do_clean
    exit;
fi
check_depend
do_compile