Skip to content

Commit

Permalink
update through script - 2024-06-11 00:56:01
Browse files Browse the repository at this point in the history
  • Loading branch information
oasido committed Jun 10, 2024
1 parent 9823d37 commit f96b2d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export PERSONAL="$HOME/personal"
export SECOND_BRAIN="$HOME/sb"
export WORK="$HOME/work"
export UNI="$HOME/uni"
export NEOVIM_DIR="$HOME/.config/nvim"
export STARTUP="$HOME/.config/autostart"
export NVM_DIR="$HOME/.nvm"
export GO="/usr/local/go/bin"
Expand Down
23 changes: 15 additions & 8 deletions .local/bin/scripts/backup
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,32 @@ set -e
timestamp=$(date +"%Y-%m-%d %H:%M:%S")

dot() {
git -C "$DOTFILES" add .
git -C "$DOTFILES" commit -m "update through script - $timestamp"
git -C "$DOTFILES" push
git -C "$DOTFILES" add .
git -C "$DOTFILES" commit -m "update through script - $timestamp"
git -C "$DOTFILES" push
echo "$DOTFILES comitted"
}

sb() {
git -C "$SECOND_BRAIN" add .
git -C "$SECOND_BRAIN" commit -m "update through script - $timestamp"
git -C "$SECOND_BRAIN" push
git -C "$SECOND_BRAIN" add .
git -C "$SECOND_BRAIN" commit -m "update through script - $timestamp"
git -C "$SECOND_BRAIN" push
echo "$SECOND_BRAIN comitted"
}

nvim() {
git -C "$NVIM_DIR" add .
git -C "$NVIM_DIR" commit -m "update through script - $timestamp"
git -C "$NVIM_DIR" push
echo "$NVIM_DIR comitted"
}

case "$1" in
dot | sb)
dot | sb | nvim)
$1
;;
*)
echo "valid commands: dot, sb" >&2
echo "valid commands: dot, sb, nvim" >&2
exit 1
;;
esac

0 comments on commit f96b2d6

Please sign in to comment.