Skip to content

Commit f3e263e

Browse files
committed
update: better installer
1 parent 613c5f3 commit f3e263e

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

installer.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@ if [[ -d ~/.local/weapon ]]; then
55
exit 0
66
fi
77

8-
echo "Installing Weapon..."
9-
mkdir -p ~/.local/weapon
10-
118
export LOCATION=~/.local/weapon
12-
cp -f ./createhackenv.sh $LOCATION
13-
cp -f ./zsh_history $LOCATION
9+
echo "Installing Weapon..."
10+
mkdir -p $LOCATION && echo "Weapon directory created at $LOCATION."
11+
cp -f ./createhackenv.sh $LOCATION && echo "createhackenv.sh copied to $LOCATION."
12+
cp -f ./zsh_history $LOCATION && echo "zsh_history copied to $LOCATION."
1413

15-
echo "source $LOCATION/createhackenv.sh" >> ~/.zshrc
14+
grep -zq "source $LOCATION/createhackenv.sh" ~/.zshrc
15+
if [[ $? -eq 0 ]]; then
16+
echo "createhackenv.sh already sourced in ~/.zshrc. sktpping..."
17+
else
18+
echo "Sourcing createhackenv.sh in ~/.zshrc..."
19+
echo "source $LOCATION/createhackenv.sh" >> ~/.zshrc
20+
fi
1621

1722
echo "Weaponized VSCode installation completed."

0 commit comments

Comments
 (0)