Skip to content

Commit fc7a821

Browse files
committed
Added macOS installer script for GarudaNvim
1 parent 268c6f7 commit fc7a821

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

installer.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env sh
2+
#
3+
# GarudaNvim installer for macOS.
4+
5+
# Welcome message
6+
echo
7+
echo "Welcome to GarudaNvim!"
8+
echo "This installer is designed for macOS."
9+
echo
10+
echo "================================================================================="
11+
echo
12+
13+
# Step 1: Check for existing Neovim configuration
14+
echo "Step 1: Checking for existing Neovim configuration in ~/.config/nvim"
15+
echo "---------------------------------------------------------------------------------"
16+
if [ -d ~/.config/nvim ]; then
17+
echo "ERROR: The directory ~/.config/nvim already exists."
18+
echo " Please move it to a different location and try again."
19+
echo
20+
exit 1
21+
fi
22+
echo "INFO: No existing Neovim configuration found."
23+
echo
24+
echo
25+
26+
# Step 2: Cloning GarudaNvim repository
27+
echo "Step 2: Installing GarudaNvim to ~/.config/nvim"
28+
echo "---------------------------------------------------------------------------------"
29+
git clone https://github.com/garudanvim/GarudaNvim.git ~/.config/nvim
30+
cd ~/.config/nvim || exit 1
31+
echo
32+
echo
33+
34+
# Step 3: Removing the .git folder
35+
echo "Step 3: Cleaning up"
36+
echo "---------------------------------------------------------------------------------"
37+
rm -rf .git
38+
echo ".git folder removed."
39+
echo
40+
echo "================================================================================="
41+
echo
42+
43+
# Success message
44+
echo "SUCCESS: GarudaNvim has been correctly installed!"
45+
echo "Happy Coding!"
46+
echo
47+
echo "================================================================================="
48+
echo
49+
50+
# Opening GarudaNvim
51+
echo "PRESS ENTER TO OPEN IT"
52+
read -r
53+
nvim
54+

0 commit comments

Comments
 (0)