Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer improvements #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ Embervim does not provide any installation scripts or programs that will install
this configuration for you. Configuration directories often live in different places
for different operating systems. Fret not, embervim is *really* easy to install:

1. Navigate to `$XDG_CONFIG_HOME/nvim`
2. Replace the `nvim` directory (if it exists) with the one in this repository
1. run the installer in terminal
```bash
bash <(curl -s https://raw.githubusercontent.com/jvegaf/embervim/install-script/linux_installer)
```
3. Launch neovim

Thats it, you're ready to go!
Expand Down
24 changes: 15 additions & 9 deletions linux-install.sh → linux_installer
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail


read -r -p "Old NeoVim configuration files will be deleted. Are you sure you want to proceed? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
then
echo "Cloning repository..."
git clone https://github.com/danlikestocode/embervim
echo "Changing directory..."
cd embervim
echo "Installing new configuration files..."
echo "Removing old configuration files..."
echo "WARN: Old configuration files will be deleted!"
rm -rd ~/.config/nvim/
rm -rf "$HOME/.config/nvim"
rm -rf "$HOME/.cache/nvim"
rm -rf "$HOME/.local/share/nvim"
rm -rf "$HOME/.local/state/nvim"
echo "Cloning repository..."
git clone https://github.com/danlikestocode/embervim
echo "Copying new configuration files..."
cp -R ./nvim/ ~/.config/nvim/
mv "./embervim/nvim" "$HOME/.config"
echo "Cleaning...."
rm -rf "./embervim"
echo "Finished!"
echo "Make sure to clean up the created Git repository!"
else
echo "Stopped installation!"
fi

exit 0




Expand Down