-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathenv.sh
executable file
·34 lines (28 loc) · 1.03 KB
/
env.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
#!/bin/bash
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export XMAKE_RCFILES=${script_dir}/tools/scripts/xmake.lua
export RT_XMAKE_LINK_TYPE="static"
# Check whether unzip is installed.
if ! command -v unzip &> /dev/null; then
echo "Unzip is not installed. Installing unzip"
# Automatically install unzip according to package manager
if [[ -n $(command -v apt-get) ]]; then
sudo apt-get update
sudo apt-get install -y unzip
elif [[ -n $(command -v yum) ]]; then
sudo yum install -y unzip
elif [[ -n $(command -v dnf) ]]; then
sudo dnf install -y unzip
elif [[ -n $(command -v pacman) ]]; then
sudo pacman -Sy --noconfirm unzip
else
echo "Unrecognized package manager, please install unzip manually."
exit 1
fi
echo "Unzip has been successfully installed."
echo "smart-build env ready!"
else
echo "smart-build env ready!"
fi
export PATH=`python3 -m site --user-base`/bin:$HOME/.env/tools/scripts:$PATH
export RTT_EXEC_PATH=/usr/bin