-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f0af9b
commit 307a35f
Showing
2 changed files
with
442 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
add_usr_local_bin_to_path() { | ||
TO_ADD=~/.local/bin | ||
echo "\nAdding $TO_ADD to your path." | ||
echo "Either provide password for superuser permission to append to /etc/paths." | ||
echo "Or press <Control+c> at this point and add it to path yourself\n" | ||
echo $TO_ADD | sudo tee -a /etc/paths | ||
LINE_TO_ADD="PATH=\$PATH:$TO_ADD" >> ~/.zshrc | ||
} | ||
|
||
install_in_usr_local() { | ||
mkdir -p ~/.local | ||
cd ~/.local | ||
curl -s https://github.com/opensource-nepal/ad2bs/blob/main/scripts/install_main.txt | sh | ||
# If command ad2bs is not found add user .local/bin to path | ||
command -v ad2bs || add_usr_local_bin_to_path | ||
cd - | ||
} | ||
|
||
install_in_usr_local | ||
(command -v ad2bs && echo "\nad2bs installed") || echo "\nRestart start your terminal and start using ad2bs" |
Oops, something went wrong.