quality of life, terminal server version

- cleanup is now opt-in instead of opt-out
- added server parameter to deploy with a different terminal scheme
This commit is contained in:
Bryan Joshua Pedini 2021-06-03 17:39:45 +02:00
parent eed4d5b142
commit 8866dc5bec
2 changed files with 26 additions and 5 deletions

View File

@ -0,0 +1,13 @@
GIT_FUNCTIONS=true
# Spaced
#PS1="${LIGHTBLUE}[ ${LIGHTRED}\u ${LIGHTBLUE}@ ${LIGHTBROWN}$(hostname --fqdn) ${LIGHTBLUE}] ${LIGHTPURPLE}( ${GREEN}\w ${LIGHTPURPLE}) "
# Not spaced
PS1="${LIGHTBLUE}[${LIGHTRED}\u${LIGHTBLUE}@${LIGHTBROWN}$(hostname --fqdn)${LIGHTBLUE}]${LIGHTPURPLE}(${GREEN}\w${LIGHTPURPLE})"
if [ $GIT_FUNCTIONS ]; then
#PS1="$PS1${LIGHTPURPLE}[${LIGHTCYAN}$(__git_prompt)${LIGHTPURPLE}]"
PS1="$PS1${LIGHTBROWN}(${LIGHTCYAN}\$(__git_prompt)${LIGHTBROWN}) "
fi
PS1="$PS1${RED}#${FORMAT_RESET}"

View File

@ -1,12 +1,15 @@
#!/usr/bin/env bash
THIS="$(dirname "$(readlink -fm "$0")")"
CLEANUP=true
SERVER=FALSE
CLEANUP=false
_arguments() {
for PARM in "$@"; do
if [ "${PARM}" = "--no-cleanup" ]; then
CLEANUP=false
if [ "${PARM}" = "--server" ]; then
SERVER=TRUE
elif [ "${PARM}" = "--cleanup" ]; then
CLEANUP=TRUE
elif [ "${PARM}" = "-h" ] || [ "${PARM}" = "--help" ]; then
_help
exit 0
@ -15,11 +18,12 @@ _arguments() {
}
_help() {
echo "Usage: $(readlink -fm "$0") [-h | --help] [--no-cleanup]"
echo "Usage: $(readlink -fm "$0") [-h | --help] [--cleanup]"
echo
echo "Options:"
echo " -h | --help : Prints this help message and quits"
echo " --no-cleanup: Does not clean the source folder after adding the bash overrides"
echo " --server: Customizes the terminal feel for a server installation"
echo " --cleanup: Removes the source folder after installation"
echo
}
@ -48,6 +52,10 @@ _main() {
echo
fi
if [ "${SERVER}" = true ]; then
sed -i 's/terminal_fancyfying/terminal_fancyfying_server/' ~/.bashrc_overrides/_all
fi
if [ "${CLEANUP}" = true ]; then
echo "cleaning up..."
_cleanup