Suppress output from brew, correct pathing for backup
This commit is contained in:
parent
dfa5ca0b37
commit
0a69b86f27
13
install.bash
13
install.bash
@ -1,18 +1,19 @@
|
|||||||
PACKER_NVIM_INSTALL_PATH="${HOME}/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
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_URL="https://gitlab.orion-technologies.io/backups/neovim-backup.git"
|
||||||
NVIM_CONF_PATH="${HOME}/.config/nvim/"
|
DOT_CONFIG_PATH="${HOME}/.config/"
|
||||||
|
NVIM_CONF_PATH="${DOT_CONFIG_PATH}/nvim"
|
||||||
|
|
||||||
required_packages=(universal-ctags fzf ripgrep neovim)
|
required_packages=(universal-ctags fzf ripgrep neovim)
|
||||||
|
|
||||||
# Handle Installation Per OS
|
# Handle Installation Per OS
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
if ! which brew 2>&1 1>/dev/null; then
|
if ! which brew 1>/dev/null 2>&1; then
|
||||||
echo "Installing brew, why the fuck aren't you using it...?"
|
echo "Installing brew, why the fuck aren't you using it...?"
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 1>/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
for package in "${required_packages[@]}"; do
|
for package in "${required_packages[@]}"; do
|
||||||
echo "Installing ${package}"
|
echo "Installing ${package}"
|
||||||
brew install "${package}"
|
brew install "${package}" 1>/dev/null 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -25,11 +26,11 @@ fi
|
|||||||
|
|
||||||
if [[ ! -d "${HOME}/.config" ]]; then
|
if [[ ! -d "${HOME}/.config" ]]; then
|
||||||
echo "The .config directory does not exist, creating now"
|
echo "The .config directory does not exist, creating now"
|
||||||
mkdir "${HOME}/.config"
|
mkdir -p "${HOME}/.config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "${NVIM_CONF_PATH}" ]]; then
|
if [[ -d "${NVIM_CONF_PATH}" ]]; then
|
||||||
backup_nvim_conf_path="${NVIM_CONF_PATH}-$(date +%Y-%m-%dT%H:%M:%S)"
|
backup_nvim_conf_path="${HOME}/.conf/$(basename "${NVIM_CONF_PATH}")-$(date +%Y-%m-%dT%H:%M:%S)"
|
||||||
echo "Backing up ${NVIM_CONF_PATH} to ${backup_nvim_conf_path}"
|
echo "Backing up ${NVIM_CONF_PATH} to ${backup_nvim_conf_path}"
|
||||||
mv "${NVIM_CONF_PATH}" "${backup_nvim_conf_path}"
|
mv "${NVIM_CONF_PATH}" "${backup_nvim_conf_path}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user