Files
env-shared/rc_shared.sh

78 lines
1.4 KiB
Bash

# Notes:
# - Please keep this file working for both BASH and ZSH. :)
## Variables ##
# Environment Usability
export PATH="$PATH:~/bin-shared:~/.bin-shared"
# PS1 Colors
export PURPLE="`tput setaf 55`"
export ORANGE="`tput setaf 208"`
export GREEN="`tput setaf 34`"
export RED="`tput setaf 196`"
export SCARLET="`tput setaf 16"0`
export YELLOW="`tput setaf 226"`
export GRAY="`tput setaf 243`"
export RESET="`tput sgr0`"
export BOLD="`tput bold`"
## Aliases ##
## Functions ##
# Related specifically to this project.
function update-shared {
log "Reloading the '~/.rc_shared' file from env-shared.\n"
branch="$1"
if [[ -z "$branch" ]]; then
branch="dev"
fi
dir="shared-rc-deleteme"
git clone https://git.hyperling.com/me/env-shared \
$dir --branch=$branch
mv -v $dir/rc_shared.sh ~/.rc_shared
mv -v $dir ~/TRASH/"$dir-`date "+%Y%m%d-%H%M%S"`"
blog "Complete! Please note this does NOT update bin files."
}
alias shared-update="update-shared"
alias reload-shared="update-shared"
alias shared-reload="update-shared"
# Shortcuts
function send-master { send_master.sh; }
function goodbye { update -y; bye; }
# Enhance Bin Scripts
function send-masters {
ls | grep MASTER | while read dir; do
echo "Preparing to sync '$dir' to '$SERVER_NAME'."
cd $dir
send-master
cd ..
done
}
# Audio
# Video
## Complete! ##
[[ $(whoami) != "root" ]] &&
echo "`date` - Shared RC Config - Complete!"