-
Notifications
You must be signed in to change notification settings - Fork 5
/
test_install_openocd.sh
executable file
·65 lines (54 loc) · 2.03 KB
/
test_install_openocd.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
#"***************************************************************************************************"
# ensure all the scripts here are executable
#"***************************************************************************************************"
echo "setting permissions"
pwd
chmod +x install_set_permissions.sh
./install_set_permissions.sh
#"***************************************************************************************************"
# common initialization
#"***************************************************************************************************"
# perform some version control checks on this file
./gitcheck.sh $0
# initialize some environment variables and perform some sanity checks
. ./init.sh
# we don't want tee to capture exit codes
set -o pipefail
cd "$WORKSPACE"
#"***************************************************************************************************"
# check for minimum system resources needed (typically 40GB new Ubuntu VM with 5GB RAM)
#"***************************************************************************************************"
if [ $(free | grep Mem | awk '{ print $2 }') -lt "$MIN_ULX3S_MEMORY" ]; then
echo ""
echo "System memory found:"
free
echo ""
read -p "Warning: At least $MIN_ULX3S_MEMORY bytes of memory is needed. Press a key to continue"
fi
if [ $(df $PWD | awk '/[0-9]%/{print $(NF-2)}' ) -lt "$MIN_ULX3S_DISK" ]; then
echo ""
echo "Disk space found in $PWD"
df $PWD
echo ""
read -p "Warning: At least $MIN_ULX3S_DISK bytes of free disk space is needed. Press a key to continue"
fi
echo "Install all ULX3S toolchains. Edit parameters in init.sh"
echo ""
echo "logs saved to $LOG_DIRECTORY"
echo ""
echo ""
read -p "Press enter to continue, or Ctrl-C to abort."
cd $SAVED_CURRENT_PATH
# check to see if we can reach repo.or.cz now, rather than pause with error later
echo ""
echo "check cz!"
echo ""
./check_cz.sh
if [ "$?" == "0" ]; then
export THIS_SKIP_CZ="false"
else
export THIS_SKIP_CZ="true"
fi
./install_openocd-esp32.sh
./install_openocd.sh