Update developer user configs

This commit is contained in:
Martinvlba 2023-11-27 10:31:58 +02:00
parent 6bd137acf8
commit e891bfaeed
3 changed files with 47 additions and 7 deletions

View File

@ -3,18 +3,33 @@
# This shell can be only spawned by ./envsetup --shell
##
# Pull user bashrc
source ~/.bashrc
source ${P_ROOT}/build/toolset/load_modules.sh
# Also source core aliases
source ${P_ROOT}/build/developer/base/core.conf
## Typical help menu
alias help='itshell_help'
clear
## Build locally with the running system ( Dirty )
alias bc='message "This option is Work In Progress"'
# Overwrite PS1 so dev knows we are in interactive shell
export PS1='\[\e[1;32m\]devenv [ \[\e[0m\]\w\[\e[1;32m\] ]$ \[\e[0m\]'
## Build the package with docker system ( Clean )
alias bcd='message "This option is Work In Progress"'
# Load all the toolset modules
# As this forces the loading modules again then send the output to nothingness
echo "Loading environment..."
source ${P_ROOT}/build/toolset/load_modules.sh > /dev/null
echo "Environment loaded"
# Clear trap and disable exit on error
trap - SIGINT INT
trap - ERR
set +e
# Sleep a bit
sleep 0.5
# Set user specific history file
export HISTFILE="${P_ROOT}/build/developer/users/$(whoami)/.bash_history"
# Pull existing user aliases.conf
# If not found then make empty one from Public user
@ -25,8 +40,14 @@ public="${P_ROOT}/build/developer/users/Public"
if [ ! -f ${who_am_i}/aliases.conf ]; then
mkdir -p ${who_am_i}
cp -rf ${public}/* ${who_am_i}
echo " " > ${who_am_i}/.bash_history
message "User: $(whoami) configuration files copied over"
fi
# As the dev probably has some aliases overwritten in he's/her aliases then lets allow them to do it by sourcing aliases.conf here :)
source ${who_am_i}/aliases.conf
# Now lets clear the shell again
clear
message "run: help to see existing documented commands"

18
base/core.conf Normal file
View File

@ -0,0 +1,18 @@
##
# Core aliases - can be overwritten by user aliases.conf
##
## Typical help menu
alias help='itshell_help'
## Build locally with the running system ( Dirty )
alias bc="itshell_pkgbuild_local ${@}"
## Build the package with docker system ( Clean )
alias bcd="itshell_pkgbuild_docker ${@}"
## Build the package with docker system ( Clean )
alias bcdk="itshell_pkgbuild_docker_kde ${@}"
## Edit PKGBUILD's by giving pkgname
alias pkgedit="itshell_pkgedit ${@}"

View File

@ -5,3 +5,4 @@
##
# Add common aliases here