You've already forked personal-linux-config
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
c8758fe259 | |||
597354356b | |||
f5fb8e5dc3 | |||
82f2d7a989 | |||
7d8f7312f1 | |||
9851de3007 | |||
8866dc5bec | |||
eed4d5b142 |
@@ -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
|
if [ -f ~/.bashrc_overrides/$source ]; then
|
||||||
. ~/.bashrc_overrides/$source
|
. ~/.bashrc_overrides/$source
|
||||||
fi
|
fi
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
alias pubkey='cat ~/.ssh/id_rsa.pub'
|
alias pubkey='cat ~/.ssh/id_rsa.pub'
|
||||||
alias hosts='sudo nano /etc/hosts'
|
alias hosts='sudo nano /etc/hosts'
|
||||||
alias historygrep='history | grep'
|
alias historygrep='history | grep'
|
||||||
|
alias newrepo='bash <(curl -s https://get.bjphoster.com/new-git-repo.sh)'
|
||||||
|
4
bashrc_overrides/home_bin_folder
Normal file
4
bashrc_overrides/home_bin_folder
Normal 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
|
13
bashrc_overrides/terminal_fancyfying_server
Normal file
13
bashrc_overrides/terminal_fancyfying_server
Normal 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}"
|
24
deploy.sh
24
deploy.sh
@@ -1,12 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
THIS="$(dirname "$(readlink -fm "$0")")"
|
THIS="$(dirname "$(readlink -fm "$0")")"
|
||||||
CLEANUP=true
|
SERVER=false
|
||||||
|
FORCE=false
|
||||||
|
CLEANUP=false
|
||||||
|
|
||||||
_arguments() {
|
_arguments() {
|
||||||
for PARM in "$@"; do
|
for PARM in "$@"; do
|
||||||
if [ "${PARM}" = "--no-cleanup" ]; then
|
if [ "${PARM}" = "--server" ]; then
|
||||||
CLEANUP=false
|
SERVER=true
|
||||||
|
elif [ "${PARM}" = "--force" ]; then
|
||||||
|
FORCE=true
|
||||||
|
elif [ "${PARM}" = "--cleanup" ]; then
|
||||||
|
CLEANUP=true
|
||||||
elif [ "${PARM}" = "-h" ] || [ "${PARM}" = "--help" ]; then
|
elif [ "${PARM}" = "-h" ] || [ "${PARM}" = "--help" ]; then
|
||||||
_help
|
_help
|
||||||
exit 0
|
exit 0
|
||||||
@@ -15,11 +21,12 @@ _arguments() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_help() {
|
_help() {
|
||||||
echo "Usage: $(readlink -fm "$0") [-h | --help] [--no-cleanup]"
|
echo "Usage: $(readlink -fm "$0") [-h | --help] [--cleanup]"
|
||||||
echo
|
echo
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -h | --help : Prints this help message and quits"
|
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
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,13 +40,12 @@ _bash_overrides() {
|
|||||||
|
|
||||||
_cleanup() {
|
_cleanup() {
|
||||||
rm -rf ${THIS}
|
rm -rf ${THIS}
|
||||||
>>>>>>> master
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_main() {
|
_main() {
|
||||||
_arguments "$@"
|
_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 "bash overrides already in place"
|
||||||
echo "skipping..."
|
echo "skipping..."
|
||||||
echo
|
echo
|
||||||
@@ -49,6 +55,10 @@ _main() {
|
|||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${SERVER}" = true ]; then
|
||||||
|
sed -i 's/terminal_fancyfying/terminal_fancyfying_server/' ~/.bashrc_overrides/_all
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${CLEANUP}" = true ]; then
|
if [ "${CLEANUP}" = true ]; then
|
||||||
echo "cleaning up..."
|
echo "cleaning up..."
|
||||||
_cleanup
|
_cleanup
|
||||||
|
Reference in New Issue
Block a user