[AUTOCONFIG] Add neovim autoconfig from .env
This commit is contained in:
parent
6e0b581da6
commit
93675f81a9
5 changed files with 79 additions and 129 deletions
36
install.sh
Normal file → Executable file
36
install.sh
Normal file → Executable file
|
@ -1,14 +1,28 @@
|
|||
#!/bin/bash
|
||||
source ./scripts/common.sh
|
||||
|
||||
OS_NAME=`cat /etc/os-release | grep "^NAME=" | sed 's/NAME=//g' | sed 's/"//g'`
|
||||
OS_NAME=${OS_NAME^^} # UPPERCASE
|
||||
if [ -f .env ]; then
|
||||
# Load Environment Variables
|
||||
export $(cat .env | grep -v '#' | awk '/=/ {print $1}')
|
||||
echo "[INFO] Environment file loaded"
|
||||
fi
|
||||
export OS_NAME=`cat /etc/os-release | grep "^NAME=" | sed 's/NAME=//g' | sed 's/"//g'`
|
||||
export OS_NAME=${OS_NAME,,} # LOWERCASE
|
||||
export CWD=$(pwd)
|
||||
|
||||
case $OS_NAME in
|
||||
"UBUNTU")
|
||||
source ./install_scripts/ubuntu.sh
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "OS not supported"
|
||||
;;
|
||||
esac
|
||||
# Initialize
|
||||
|
||||
## Detect current package manager
|
||||
command_exists pacman && export PM=pacman
|
||||
|
||||
if ! [[ -z "${PM}" ]]; then
|
||||
echo "[INFO] Package manager set to : $PM"
|
||||
else
|
||||
echo '[ERROR] No package manager found. Aborting...' >&2
|
||||
fi
|
||||
|
||||
|
||||
find ./scripts -type f -iname "*.sh" -exec chmod +x {} \;
|
||||
|
||||
# Install and configure functionality
|
||||
./scripts/tools/neovim/install.sh
|
Loading…
Add table
Add a link
Reference in a new issue