File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,3 +4,28 @@ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
55export XMAKE_RCFILES=${script_dir} /tools/scripts/xmake.lua
66export RT_XMAKE_LINK_TYPE=" static"
7+
8+
9+ # Check whether unzip is installed.
10+ if ! command -v unzip & > /dev/null; then
11+ echo " Unzip is not installed. Installing unzip"
12+
13+ # Automatically install unzip according to package manager
14+ if [[ -n $( command -v apt-get) ]]; then
15+ sudo apt-get update
16+ sudo apt-get install -y unzip
17+ elif [[ -n $( command -v yum) ]]; then
18+ sudo yum install -y unzip
19+ elif [[ -n $( command -v dnf) ]]; then
20+ sudo dnf install -y unzip
21+ elif [[ -n $( command -v pacman) ]]; then
22+ sudo pacman -Sy --noconfirm unzip
23+ else
24+ echo " Unrecognized package manager, please install unzip manually."
25+ exit 1
26+ fi
27+
28+ echo " Unzip has been successfully installed."
29+ else
30+ echo " Unzip is installed."
31+ fi
You can’t perform that action at this time.
0 commit comments