recognize architecture
parent
6d65045ebe
commit
2bf749b955
30
one-touch.sh
30
one-touch.sh
|
@ -5,14 +5,30 @@ set -ex
|
|||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
|
||||
apt-get install -y curl wget unzip
|
||||
|
||||
# get_architecture
|
||||
arch=$(uname -m)
|
||||
|
||||
# 设置 ARCHITECTURE 变量
|
||||
if [[ $arch == "aarch64" ]]; then
|
||||
ARCHITECTURE="arm64"
|
||||
elif [[ $arch == "x86_64" ]]; then
|
||||
ARCHITECTURE="x86_64"
|
||||
else
|
||||
ARCHITECTURE="unknown"
|
||||
fi
|
||||
|
||||
|
||||
# step 0: prepare
|
||||
OS_ARCH=${1}
|
||||
WORKSPACE=${2}
|
||||
passwd=${3}
|
||||
uid=${4}
|
||||
server_address=${5}
|
||||
user_name=${6}
|
||||
test_or_not=${7}
|
||||
OS_ARCH=$ARCHITECTURE
|
||||
WORKSPACE=${1}
|
||||
passwd=${2}
|
||||
uid=${3}
|
||||
server_address=${4}
|
||||
user_name=${5}
|
||||
test_or_not=${6}
|
||||
|
||||
mkdir -p ${WORKSPACE}
|
||||
cd ${WORKSPACE}
|
||||
|
|
Loading…
Reference in New Issue