Skip to content

Commit

Permalink
Update: Adding ability to install NVM
Browse files Browse the repository at this point in the history
1 - Adding ability to install NVM ( node version manager )
2 -  Updating read me file
  • Loading branch information
llaravell committed Mar 11, 2024
1 parent 07e8966 commit dd9ce7c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions mahimana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,21 @@ getSSLWithNginx() {
fi
}

# Install NVM
installNVM() {
printf "${Blue} 🚀 Starting install NVM ... ${NC} \n";
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh > /dev/null 2>&1 & spinner | bash > /dev/null 2>&1 & spinner;
printf "${Green} 🎉 NVM is installed ${NC} \n";
# Ask for reopen shell
read -p "Do you want to reopen shell? (y/n): " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
# Reopen shell
exec $SHELL
fi
}

# Main
main() {
clear
Expand All @@ -511,6 +526,7 @@ main() {
printf "${Cyan}7. Change Hostname ${Purple} ($(showHostname)) ${Red}[Server]${NC}\n"
printf "${Cyan}8. Install Nginx ${Red}[Server]${NC}\n"
printf "${Cyan}9. Get SSL for domain with Nginx ${Red}[Server]${NC}\n"
printf "${Cyan}10. Install NVM (Node Version Manager)${NC}\n"

read -p "Enter your choice: " choice

Expand Down Expand Up @@ -542,6 +558,9 @@ main() {
9)
getSSLWithNginx
;;
10)
installNVM
;;
*)
printf "${Red}Invalid choice. Exiting.${NC}\n"
exit 1
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
" alt="shields" /></p>

<h2>Screen Shot</h2>
<img src="https://s8.uupload.ir/files/screenshot_from_2024-03-11_15-27-00_fyzj.png" alt="screenshot" />
<img src="https://s8.uupload.ir/files/screenshot_from_2024-03-11_16-00-49_n3t2.png" alt="screenshot" />

<h2>🧐 Features</h2>

Expand All @@ -23,6 +23,7 @@ Here're some of the project's best features:
* Change Hostname
* Install Nginx
* Get SSL with domain and Nginx
* Install NVM (Node Version Manager)

<h2>🛠️ Usage</h2>

Expand Down

0 comments on commit dd9ce7c

Please sign in to comment.