File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -5,20 +5,26 @@ if ! [ -x "$(command -v wget)" ]; then
55 exit 1
66fi
77
8+ if [[ -z " ${ZIGD_DIRECTORY} " ]]; then
9+ ZIGD_PATH=$HOME /.zigd
10+ else
11+ ZIGD_PATH=$ZIGD_DIRECTORY
12+ fi
13+
814# Setup
9- mkdir -p $HOME /.zigd /bin
15+ mkdir -p $ZIGD_PATH /bin
1016
1117# Zigd
12- wget https://github.com/trnxdev/zigd/releases/latest/download/zigd -O $HOME /.zigd /bin/zigd
13- chmod +x $HOME /.zigd /bin/zigd
18+ wget https://github.com/trnxdev/zigd/releases/latest/download/zigd -O $ZIGD_PATH /bin/zigd
19+ chmod +x $ZIGD_PATH /bin/zigd
1420
1521# Zigdemu
16- wget https://github.com/trnxdev/zigd/releases/latest/download/zigdemu -O $HOME /.zigd /bin/zigdemu
17- chmod +x $HOME /.zigd /bin/zigdemu
22+ wget https://github.com/trnxdev/zigd/releases/latest/download/zigdemu -O $ZIGD_PATH /bin/zigdemu
23+ chmod +x $ZIGD_PATH /bin/zigdemu
1824
1925# Yipee! You installed zigd
2026echo ' Succesfully installed! Now do `zigd setup [a zig version of your choice]`'
21- echo ' Also, you have to add `export PATH=$HOME/.zigd/ bin:$PATH` to your ~/.bashrc'
27+ echo " Also, you have to add ` export PATH=${ZIGD_PATH} / bin:$PATH ` to your ~/.bashrc"
2228echo ' and then run `source ~/.bashrc` in this terminal to start using zigd!'
2329
2430exit 0
You can’t perform that action at this time.
0 commit comments