Skip to content

Instantly share code, notes, and snippets.

@ojongchul
Created December 13, 2019 04:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ojongchul/23693b973824c32e7e338060c5d1708e to your computer and use it in GitHub Desktop.
Save ojongchul/23693b973824c32e7e338060c5d1708e to your computer and use it in GitHub Desktop.
#!/bin/bash
cd ~/wiki/
watch -n 10 -g -d git status -s
git add -A;
git commit -am "$(git status -s)"
ls -alt --time-style='+%Y-%m-%d %H:%M' *.md | awk '{print "* ["$6, $7"]", "[["substr($8,0,length($8)-2)"]]" "(/"$8")"}' > index.md
git add -A;
git commit -am "$(git status -s)"
git push
cp $HOME/{.zshrc,.vimrc} ~/dotfile/ && cd ~/dotfile/
gs="$(git status | grep -i "modified")"
git add -u;
git commit -m "New backup `date +'%Y-%m-%d %H:%M:%S'`";
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment