-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·31 lines (23 loc) · 795 Bytes
/
install.sh
File metadata and controls
executable file
·31 lines (23 loc) · 795 Bytes
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
#!/usr/bin/env sh
if ! [ -x "$(command -v wget)" ]; then
echo 'wget is required to install zigd'
exit 1
fi
if [ -z "${ZIGD_DIRECTORY}" ]; then
ZIGD_PATH=$HOME/.zigd
else
ZIGD_PATH=$ZIGD_DIRECTORY
fi
# Setup
mkdir -p $ZIGD_PATH/bin
# Zigd
wget https://github.com/trnxdev/zigd/releases/latest/download/zigd -O $ZIGD_PATH/bin/zigd
chmod +x $ZIGD_PATH/bin/zigd
# Zigdemu
wget https://github.com/trnxdev/zigd/releases/latest/download/zigdemu -O $ZIGD_PATH/bin/zigdemu
chmod +x $ZIGD_PATH/bin/zigdemu
# Yipee! You installed zigd
echo "Succesfully installed! Now do 'zigd setup [a zig version of your choice]'"
echo "Don't forget to add 'export PATH=$ZIGD_PATH/bin:\$PATH' to your '~/.bashrc'"
echo "and run 'source ~/.bashrc' (or restart the terminal) to start using zigd!"
exit 0