forked from jmahler/mips-cpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check-install.sh
executable file
·55 lines (46 loc) · 981 Bytes
/
check-install.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
#!/bin/sh
#
# NAME
#
# check-install.sh
#
# DESCRIPTION
#
# Run this script to check if the system has all the required
# programs installed.
#
# Checking for required programs...
# mips-linux-gnu-objcopy
# mips-linux-gnu-as
# iverilog
# Please install the missing programs and retry.
#
error=0
echo "Checking for required programs..."
if ! which "gcc" >/dev/null ; then
echo " gcc"
error=1
fi
if ! which "mips-linux-gnu-objcopy" >/dev/null ; then
echo " mips-linux-gnu-objcopy"
error=1
fi
if ! which "mips-linux-gnu-as" >/dev/null ; then
echo " mips-linux-gnu-as"
error=1
fi
if ! which "mips-linux-gnu-gcc" >/dev/null ; then
echo " gcc-mips-linux-gnu"
echo " dpkg --add-architecture mips"
echo " apt-get install gcc-mips-linux-gnu"
error=1
fi
if ! which "iverilog" >/dev/null ; then
echo " iverilog"
error=1
fi
if [ "$error" -ne 0 ]; then
echo "Please install the missing programs and retry."
else
echo "System looks ready"
fi