Some varible cleanup, backup user nvim config
This commit is contained in:
parent
784c98ec78
commit
9f55f96731
21
install.bash
21
install.bash
@ -1,4 +1,7 @@
|
||||
NVIM_CONF_GIT="https://gitlab.orion-technologies.io/backups/neovim-backup.git"
|
||||
PACKER_NVIM_INSTALL_PATH="${HOME}/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
||||
NVIM_CONF_URL="https://gitlab.orion-technologies.io/backups/neovim-backup.git"
|
||||
NVIM_CONF_PATH="${HOME}/.config/nvim/"
|
||||
|
||||
required_packages=(universal-ctags fzf ripgrep neovim)
|
||||
|
||||
# Handle Installation Per OS
|
||||
@ -14,16 +17,24 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
||||
fi
|
||||
|
||||
echo "Installing packer.nvim"
|
||||
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||
~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
if [[ ! -d "${PACKER_NVIM_INSTALL_PATH}" ]]; then
|
||||
echo "Installing packer.nvim as it is not installed"
|
||||
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||
"${PACKER_NVIM_INSTALL_PATH}" || echo "packer.nvim already installed"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${HOME}/.config" ]]; then
|
||||
echo "The .config directory does not exist, creating now"
|
||||
mkdir "${HOME}/.config"
|
||||
fi
|
||||
|
||||
if [[ -d "${NVIM_CONF_PATH}" ]]; then
|
||||
backup_nvim_conf_path="${NVIM_CONF_PATH}-$(date +%Y-%m-%dT%H:%M:%S)"
|
||||
echo "Backing up ${NVIM_CONF_PATH} to ${backup_nvim_conf_path}"
|
||||
mv "${NVIM_CONF_PATH}" "${backup_nvim_conf_path}"
|
||||
fi
|
||||
|
||||
echo "Installing neovim configuration from ${NVIM_CONF_GIT}"
|
||||
git clone "${NVIM_CONF_GIT}" ~/.config/nvim
|
||||
git clone "${NVIM_CONF_URL}" ~/.config/nvim
|
||||
|
||||
echo "Finished installation"
|
||||
|
Loading…
Reference in New Issue
Block a user