Auto Update

This commit is contained in:
matt1432 2023-01-22 14:37:41 -05:00
parent 16c2eec72d
commit d3a792b61b
2 changed files with 7 additions and 7 deletions

View file

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Show env vars # Show env vars
grep -v '^#' .env grep -v '^#' ../../.env
# Export env vars # Export env vars
set -o allexport set -o allexport
source .env source ../../.env
set +o allexport set +o allexport

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# updates all dotfiles on the system # updates all dotfiles on the system
rm ../../.bash* ../../.profile /root/.bash* /etc/nanorc rm ../../.bash* ../../.profile /root/.bash* /etc/nanorc ../../.PS1 /root/.PS1
ln ./.bash* /root ln ./.bash* /root
ln ./.bash* ../../ ln ./.bash* ../../
@ -13,22 +13,22 @@ cp .profile /root
ln ./nanorc /etc/nanorc ln ./nanorc /etc/nanorc
# changes PS1 prompts # changes PS1 prompts
SERV_COLOR=""
source ./setenv.sh
## root PS1 ## root PS1
RED="01;31m" RED="01;31m"
cat << EOF >> /root/.PS1 cat << EOF >> /root/.PS1
PS1='\[\033[$RED\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ ' PS1='\[\033[$RED\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
EOF EOF
## user PS1 ## user PS1
GREEN="01;32m" GREEN="01;32m"
cat << EOF >> ~/.PS1 cat << EOF >> ../../.PS1
PS1='\[\033[$GREEN\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ ' PS1='\[\033[$GREEN\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
EOF EOF
if [ -f ~/git/dotfiles/.env ] ; then if [ -f ../../.env ] ; then
source ./setenv.sh
rm /etc/sudoers.d/user rm /etc/sudoers.d/user
echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/user echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/user
fi fi