Skip to content

Commit b8fa529

Browse files
committed
update: location
1 parent 3ec4501 commit b8fa529

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

installer.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function main() {
3636
echo "If you want to force install without checking requirements, run the script with FORCE_INSTALL=true ./installer.sh"
3737
exit 1
3838
fi
39-
40-
if [[ -z "$WEAPON_LOCATON" ]]; then
39+
40+
if [[ -z "$WEAPON_LOCATION" ]]; then
4141
echo "WEAPON_LOCATION is not set. set to default ~/.local/weapon"
4242
export WEAPON_LOCATION=~/.local/weapon
4343
echo "You can set it by exporting WEAPON_LOCATION=your_desired_path before running this script."
@@ -52,9 +52,7 @@ function main() {
5252
read
5353
echo "Installing Weapon..."
5454
mkdir -p $LOCATION && echo "Weapon directory created at $LOCATION."
55-
cp -f ./createhackenv.sh $LOCATION && echo "createhackenv.sh copied to $LOCATION."
56-
echo "" >>$LOCATION/createhackenv.sh
57-
sed -i "s/__REPLACE__/$LOCATION/g" $LOCATION/createhackenv.sh && echo "createhackenv.sh updated with WEAPON_LOCATION."
55+
cat ./createhackenv.sh |sed -e "s#__REPLACE__#$LOCATION#g" > $LOCATION/createhackenv.sh && echo "createhackenv.sh copied to $LOCATION."
5856
cp -f ./zsh_history $LOCATION && echo "zsh_history copied to $LOCATION."
5957

6058
grep -zq "source $LOCATION/createhackenv.sh" ~/.zshrc

0 commit comments

Comments
 (0)