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"