forked from NJU-ProjectN/nemu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.sh
More file actions
42 lines (37 loc) · 1.01 KB
/
env.sh
File metadata and controls
42 lines (37 loc) · 1.01 KB
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
#!/bin/bash
# check the necessary tools
if ! command -v bison > /dev/null 2>&1; then
echo "bison is not installed. Installing..."
sudo apt update
sudo apt install bison
else
echo "bison is installed."
fi
if ! command -v flex > /dev/null 2>&1; then
echo "flex is not installed. Installing..."
sudo apt update
sudo apt install flex
else
echo "flex is installed."
fi
if dpkg -l | grep -q libncurses-dev; then
echo "libncurses-dev is installed."
else
echo "libncurses-dev is not installed. Installing..."
sudo apt update
sudo apt install -y libncurses-dev
fi
if dpkg -l | grep -q libreadline-dev; then
echo "libreadline-dev is installed."
else
echo "libreadline-dev is not installed. Installing..."
sudo apt update
sudo apt install -y libreadline-dev
fi
# set enviroment
export NEMU_HOME=$(pwd)/nemu
echo "set NEMU_HOME=${NEMU_HOME}"
export AM_HOME=$(pwd)/abstract-machine
echo "set AM_HOME=${AM_HOME}"
export NAVY_HOME=$(pwd)/navy-apps
echo "set NAVY_HOME=${NAVY_HOME}"