diff options
author | Blaise Thompson <blaise@untzag.com> | 2018-04-23 17:38:13 -0500 |
---|---|---|
committer | Blaise Thompson <blaise@untzag.com> | 2018-04-23 17:38:13 -0500 |
commit | 2a5f3b030370e8f2af471fea0935156f664df458 (patch) | |
tree | 677c88f070c1a6e6ceb8ec0dbe24d4d71183300d | |
parent | b486d6490610c0192fe185f1c69ba5f7551cf529 (diff) |
2018-04-23 17:38
-rw-r--r-- | dotfiles/bashrc.sync | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/dotfiles/bashrc.sync b/dotfiles/bashrc.sync index cf7dc81..7ea5f2c 100644 --- a/dotfiles/bashrc.sync +++ b/dotfiles/bashrc.sync @@ -5,17 +5,32 @@ export PATH="/opt/anaconda/bin:$PATH" export VISUAL=vim export EDITOR="$VISUAL" -function blaise() { - echo hello -} - +# --- functions ----------------------------------------------------------------------------------- function countdown(){ - secs=$(($1 * 60)); - date1=$((`date +%s` + "$secs")); - while [ "$date1" -ge `date +%s` ]; do - echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r"; - sleep 0.1 - done + secs=$(($1 * 60)); + date1=$((`date +%s` + "$secs")); + while [ "$date1" -ge `date +%s` ]; do + echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r"; + sleep 0.1 + done +} + +function git-commit-with-timestamp(){ + echo " " + pwd + git remote update + git pull + if ! git diff --quiet + then + echo "COMMITING" + git add --all + git commit -m "$(date +"%Y-%m-%d %H:%M")" + git push + fi } +function git-sync-all(){ + cd ~/org; git-commit-with-timestamp; + cd ~/dotfiles; git-commit-with-timestamp; +}
\ No newline at end of file |