guowenxue
2023-07-10 5e9d03d507aad324a803eb8795e0eed6fb671761
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
 
ARCH=`uname -m` 
 
function msg_banner()
{
    echo ""
    echo "+-----------------------------------------------------------------------"
    echo "|  $1 "
    echo "+-----------------------------------------------------------------------"
    echo ""
}
 
echo ${ARCH} | grep "arm" > /dev/null 
if [ $? == 0 ] ; then 
   msg_banner "Start local compile on RaspberryPi..."   
   cd arm && bash build.sh
   exit 0;
fi 
 
echo ${ARCH} | grep "x86" > /dev/null 
if [ $? == 0 ] ; then 
   msg_banner "Start cross compile on x86 server..."   
   cd x86 && bash build.sh
   exit 0;
fi