-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinput.sh
49 lines (44 loc) · 1.32 KB
/
input.sh
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
ARCH=$(uname -m)
echo $ARCH
FILE="horizon-agent-linux-deb-amd64.tar.gz"
if [ "${ARCH}" = "x86_64" ]
then
FILE="horizon-agent-linux-deb-amd64.tar.gz"
elif [ "${ARCH}" = "armv7l" ]
then
FILE="horizon-agent-linux-deb-armhf.tar.gz"
elif [ "${ARCH}" = "aarch64" ]
then
FILE="horizon-agent-linux-deb-arm64.tar.gz"
else
FILE="horizon-agent-linux-deb-amd64.tar.gz"
fi
BASEDIR=$(dirname $0)
echo ${BASEDIR}
cd ${BASEDIR}
echo ${version}
echo ${css}
if [ "${css}" = "true" ]
then
./agent-install.sh -i css: -C
elif [ "${version}" = "" ]
then
echo curl -sSL https://github.com/open-horizon/anax/releases/latest/download/${FILE} -o ${FILE}
curl -sSL https://github.com/open-horizon/anax/releases/latest/download/${FILE} -o ${FILE}
tar -zxvf ${FILE}
./agent-install.sh -C
else
echo curl -sSL https://github.com/open-horizon/anax/releases/download/${version}/${FILE} -o ${FILE}
curl -sSL https://github.com/open-horizon/anax/releases/download/${version}/${FILE} -o ${FILE}
tar -zxvf ${FILE}
./agent-install.sh -C
fi
export HORIZON_URL="http://localhost:8081"
watch hzn agreement list
# oh deploy setup --org $org_id
#docker run -v /var/run/docker.sock:/var/run/docker.sock -ti docker
# echo "Docker login"
# read docker_user
# read -s -p "Password: " password
# docker login --username=$docker_user --password=$password