8 Commits
0.1.0 ... 0.1.2

Author SHA1 Message Date
c8758fe259 neatly formatted for loop for better human reading
not that you would ever need to go into that manually anyway, but still...
2021-07-17 15:57:52 +02:00
597354356b for some reason sometimes I do not have home bin folder added automatically
no problem, fixed
2021-07-17 15:57:27 +02:00
f5fb8e5dc3 newrepo convenience alias added 2021-07-09 18:39:31 +02:00
82f2d7a989 today I'm stupid, what can you do about it? 2021-06-03 17:47:29 +02:00
7d8f7312f1 oopsie.. 2021-06-03 17:45:49 +02:00
9851de3007 may the Force be with you 2021-06-03 17:44:18 +02:00
8866dc5bec 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
2021-06-03 17:39:45 +02:00
eed4d5b142 little bugfix 2021-04-23 23:39:19 +02:00
5 changed files with 44 additions and 8 deletions

View File

@@ -1,4 +1,12 @@
for source in colored_commands convenience_aliases git_functions histcontrol ls_aliases safety_aliases terminal_colors terminal_fancyfying; do
for source in colored_commands \
convenience_aliases \
git_functions \
histcontrol \
home_bin_folder \
ls_aliases \
safety_aliases \
terminal_colors \
terminal_fancyfying; do
if [ -f ~/.bashrc_overrides/$source ]; then
. ~/.bashrc_overrides/$source
fi

View File

@@ -1,3 +1,4 @@
alias pubkey='cat ~/.ssh/id_rsa.pub'
alias hosts='sudo nano /etc/hosts'
alias historygrep='history | grep'
alias newrepo='bash <(curl -s https://get.bjphoster.com/new-git-repo.sh)'

View File

@@ -0,0 +1,4 @@
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi

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,18 @@
#!/usr/bin/env bash
THIS="$(dirname "$(readlink -fm "$0")")"
CLEANUP=true
SERVER=false
FORCE=false
CLEANUP=false
_arguments() {
for PARM in "$@"; do
if [ "${PARM}" = "--no-cleanup" ]; then
CLEANUP=false
if [ "${PARM}" = "--server" ]; then
SERVER=true
elif [ "${PARM}" = "--force" ]; then
FORCE=true
elif [ "${PARM}" = "--cleanup" ]; then
CLEANUP=true
elif [ "${PARM}" = "-h" ] || [ "${PARM}" = "--help" ]; then
_help
exit 0
@@ -15,11 +21,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
}
@@ -33,13 +40,12 @@ _bash_overrides() {
_cleanup() {
rm -rf ${THIS}
>>>>>>> master
}
_main() {
_arguments "$@"
if [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ]; then
if [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ] && [ "${FORCE}" = false ]; then
echo "bash overrides already in place"
echo "skipping..."
echo
@@ -49,6 +55,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