Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,28 @@ 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."
else
echo "Unzip is installed."
fi