From 5d58dc85387159bc8478a2dd9eabd61a61344e9f Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 22 Jan 2023 12:06:52 -0500 Subject: [PATCH] Auto Update --- setenv.sh | 9 +++++++++ setup.sh | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 setenv.sh diff --git a/setenv.sh b/setenv.sh new file mode 100644 index 0000000..02fa78a --- /dev/null +++ b/setenv.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Show env vars +grep -v '^#' .env + +# Export env vars +set -o allexport +source .env +set +o allexport diff --git a/setup.sh b/setup.sh index 3fd6a87..d8883d2 100644 --- a/setup.sh +++ b/setup.sh @@ -10,14 +10,15 @@ cp .profile /root cat << EOF >> /root/.bashrc -PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +PS1='\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ ' EOF ln ./nanorc /etc/nanorc -if [ "$1" != "" ] ; then +if [ -f ~/git/dotfiles/.env ] ; then + source ./setenv.sh rm /etc/sudoers.d/user - echo "$1 ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/user + echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/user fi echo "Install fzf, log out and log back in"