From 16c2eec72d0a14d743b02ab10238e076b595dea6 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 22 Jan 2023 14:23:01 -0500 Subject: [PATCH] Auto Update --- .bashrc | 4 ++-- setup.sh | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.bashrc b/.bashrc index 9a7bb71..5ae823e 100644 --- a/.bashrc +++ b/.bashrc @@ -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 diff --git a/setup.sh b/setup.sh index d8883d2..3191ab8 100644 --- a/setup.sh +++ b/setup.sh @@ -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