This commit is contained in:
Austen Adler 2015-08-24 21:43:29 +00:00
parent 9d3ea0cece
commit d27050173e
2 changed files with 27 additions and 11 deletions

View File

@ -51,7 +51,7 @@ while getopts ":hbsdpcw" VALUE "$@"; do
rm -rf ~/.antigen rm -rf ~/.antigen
fi fi
echo "Syncing config files" echo "Syncing config files"
if which trash >/dev/null; then if command -v trash 2>&1 /dev/null; then
trash ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc trash ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc
else else
rm ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc rm ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc
@ -65,8 +65,8 @@ while getopts ":hbsdpcw" VALUE "$@"; do
ln -s $ABSPATH/git/gitconfig ~/.gitconfig ln -s $ABSPATH/git/gitconfig ~/.gitconfig
ln -s $ABSPATH/shells/bashrc ~/.bashrc ln -s $ABSPATH/shells/bashrc ~/.bashrc
ln -s $ABSPATH/zsh ~/.zsh ln -s $ABSPATH/zsh ~/.zsh
if which git >/dev/null; then if command -v git 2>&1 >/dev/null; then
if which zsh >/dev/null; then if command -v zsh 2>&1 >/dev/null; then
ln -s $ABSPATH/shells/zshrc ~/.zshrc ln -s $ABSPATH/shells/zshrc ~/.zshrc
if [ ! -d ~/.antigen ] ; then if [ ! -d ~/.antigen ] ; then
git clone https://github.com/zsh-users/antigen ~/.antigen git clone https://github.com/zsh-users/antigen ~/.antigen
@ -78,11 +78,13 @@ while getopts ":hbsdpcw" VALUE "$@"; do
git clone https://github.com/stonewareslord/fzf.git ~/.fzf git clone https://github.com/stonewareslord/fzf.git ~/.fzf
~/.fzf/install -y ~/.fzf/install -y
fi fi
else
echo "No git! Not installing fzf or antigen"
fi fi
mkdir -p ~/.config mkdir -p ~/.config
ln -s $ABSPATH/shells/liquidpromptrc ~/.config/liquidpromptrc ln -s $ABSPATH/shells/liquidpromptrc ~/.config/liquidpromptrc
if [ "$(uname)" != "Darwin" ]; then if [ "$(uname)" != "Darwin" ]; then
if which trash >/dev/null; then if command -v trash 2>&1 >/dev/null; then
trash ~/.i3/config ~/.i3/run.sh ~/.Xmodmap ~/.xsession ~/.config/synapse/gtkrc ~/.Xresources trash ~/.i3/config ~/.i3/run.sh ~/.Xmodmap ~/.xsession ~/.config/synapse/gtkrc ~/.Xresources
else else
rm ~/.i3/config ~/.i3/run.sh ~/.Xmodmap ~/.xsession ~/.config/synapse/gtkrc ~/.Xresources rm ~/.i3/config ~/.i3/run.sh ~/.Xmodmap ~/.xsession ~/.config/synapse/gtkrc ~/.Xresources

View File

@ -2,14 +2,8 @@ export HISTFILE=$HOME/.zsh_history
for config (~/.zsh/*.zsh) source $config for config (~/.zsh/*.zsh) source $config
ZSH_THEME="af-magic" ZSH_THEME="af-magic"
source "$HOME/.antigen/antigen.zsh" source "$HOME/.antigen/antigen.zsh"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
HIST_STAMPS="dd.mm.yyyy"
setopt APPEND_HISTORY setopt APPEND_HISTORY
HIST_STAMPS="dd.mm.yyyy"
HISTSIZE=12000 HISTSIZE=12000
SAVEHIST=10000000 SAVEHIST=10000000
setopt INTERACTIVECOMMENTS setopt INTERACTIVECOMMENTS
@ -215,6 +209,26 @@ function por(){
*) echo "Opts: use make unmask mask accept_keywords" *) echo "Opts: use make unmask mask accept_keywords"
esac esac
} }
function ncsu-git-init(){
branch=$(git remote -v | ag '^origin\s+' | sed -e 's/^origin\s*//' | cut -d\ -f1 | sed -e 's/^.\+\///' -e 's/\.git$//' | head -n1 | sha512sum | cut -d\ -f1)
echo Branch will be: $branch
remote="gcrypt::git@github.ncsu.edu:agadler/a86a0f8757772be2ec617b395a0716679bfce51c1bfdeb8da6127feebd84facde645e9e30188318344eb458f5834e3d86800.git#$branch"
echo -n "Add $remote? "
read a
git remote add ncsu $remote
git config remote.ncsu.gcrypt-participants "CCDFE3F1"
echo -n "Push? "
read a
git push ncsu --all
git push ncsu --tags
}
function ncsu-git-clone(){
branch=$(echo $1 | sha512sum | cut -d\ -f1)
echo Branch will be: $branch
echo -n "Continue?"
read a
git clone "gcrypt::git@github.ncsu.edu:agadler/a86a0f8757772be2ec617b395a0716679bfce51c1bfdeb8da6127feebd84facde645e9e30188318344eb458f5834e3d86800.git#$branch" $1
}
function k(){ function k(){
#More than 1 arguement #More than 1 arguement
if [[ $# > 1 ]] ; then if [[ $# > 1 ]] ; then