From be1cbd69d4cb3ffc7a9d0520c6893091ff758d69 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 3 Jun 2023 18:33:55 -0700 Subject: [PATCH] Faster loading rework - Fixed Batou Local Bits - fixed case insensitivyt bug - added oracle server bit - added the loader stub --- 0-builder | 7 ++++--- 2-loader | 8 ++++++++ hostname/oracle-2.sh | 16 ++++++++++++++++ path_enviornment.sh | 1 + 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 2-loader create mode 100644 hostname/oracle-2.sh diff --git a/0-builder b/0-builder index 759f487..78e9974 100644 --- a/0-builder +++ b/0-builder @@ -30,8 +30,9 @@ echo """#!/bin/bash """ > $COMPILED_SRC - -HOST_SPECIFIC_META_SRC="$BASHRC_D/hostname/$(hostname).meta.sh" +__HOSTNAME=$(hostname) +__HOSTNAME=${__HOSTNAME,,} # make it lowercase +HOST_SPECIFIC_META_SRC="$BASHRC_D/hostname/${__HOSTNAME}.meta.sh" if [[ -e $HOST_SPECIFIC_META_SRC ]]; then echo "Executing host specific config file $HOST_SPECIFIC_META_SRC" source "$HOST_SPECIFIC_META_SRC" @@ -51,7 +52,7 @@ for F in $(find $BASHRC_D -maxdepth 1 -iname "*.sh"); do echo "" >> $COMPILED_SRC done -HOST_SPECIFIC_SRC="$BASHRC_D/hostname/$(hostname).sh" +HOST_SPECIFIC_SRC="$BASHRC_D/hostname/${__HOSTNAME}.sh" if [[ -e $HOST_SPECIFIC_SRC ]]; then echo "Adding host specific file $HOST_SPECIFIC_SRC" echo "##################" >> $COMPILED_SRC diff --git a/2-loader b/2-loader new file mode 100644 index 0000000..5487101 --- /dev/null +++ b/2-loader @@ -0,0 +1,8 @@ + + + +# These lines are to be appended to the default Ubuntu bashrc script +# the only line I add to modify this file +if [[ -e ${HOME}/.bashrc.d/1-compiled ]]; then + source ${HOME}/.bashrc.d/1-compiled +fi diff --git a/hostname/oracle-2.sh b/hostname/oracle-2.sh new file mode 100644 index 0000000..1f48743 --- /dev/null +++ b/hostname/oracle-2.sh @@ -0,0 +1,16 @@ +#!/bin/bash + + + + +COLOR_RST='\[\e[39m\e[49m\]' +ULINE='\[\e[4m\]' +ULINE_RST='\[\e[24m\]' + +COLOR_NORM='\[\e[1;36m\e[47m\]' # Oracle Blue on White +alt_hostname="${ULINE}${COLOR_NORM}\h${COLOR_RST}${ULINE_RST}" + +export PS1="\[\e[01;32m\]\u\[\e[00m\]@\[\e[01;32m\]${alt_hostname}" +export PS1+="\[\e[01;34m\] \w \\$\[\e[00m\] " + +unset $alt_hostname $COLOR_NORM $ULINE $ULINE_RST $COLOR_RST diff --git a/path_enviornment.sh b/path_enviornment.sh index 4bb4df1..97c2b91 100644 --- a/path_enviornment.sh +++ b/path_enviornment.sh @@ -66,6 +66,7 @@ __LOAD_DIRS=( /opt/fpga /opt/makemkv /opt/icestorm + /opt/openmhz /opt/gemini $HOME/.local/share/gem/ruby/3.0.0 )