24 lines
602 B
Bash
24 lines
602 B
Bash
#!/bin/bash
|
|
|
|
# updates all dotfiles on the system
|
|
TODELETE="$(command ls --almost-all files) .PS1"
|
|
|
|
(cd ../.. ; rm $TODELETE)
|
|
(cd /root ; rm $TODELETE)
|
|
|
|
cp -r ./files/. /root
|
|
for f in ./files/.*; do if [[ -f $f ]]; then ln ./$f ../../ ; fi; done
|
|
|
|
source ./setenv.sh
|
|
|
|
## root PS1
|
|
RED="01;31m"
|
|
cat << EOF >> /root/.PS1
|
|
PS1='\[\033[$RED\]\u\[\033[01;38;5;${SERV_COLOR}m\]@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
|
|
EOF
|
|
|
|
## user PS1 # TODO? put in getenv
|
|
GREEN="01;32m"
|
|
cat << EOF >> ../../.PS1
|
|
PS1='\[\033[$GREEN\]\u\[\033[01;38;5;${SERV_COLOR}m\]@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
|
|
EOF
|