Auto Update

This commit is contained in:
matt1432 2023-01-22 14:23:01 -05:00
parent 380350872d
commit 16c2eec72d
2 changed files with 17 additions and 5 deletions

View file

@ -66,8 +66,8 @@ if [ -f ~/.autoheadscale ] ; then
. ~/.autoheadscale
fi
if [ -f ~/git/dotfiles/.PS1 ] ; then
source ~/git/dotfiles/.PS1
if [ -f ~/.PS1 ] ; then
source ~/.PS1
else
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
fi

View file

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