Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # zim_update - update the zim repository
- #
- local current_head
- local diff
- cd ${ZIM_HOME}
- current_head=$(git rev-parse HEAD)
- # this is the cleanest way I know how to update a repository
- git remote update -p
- git merge --ff-only @\{u\}
- # and update the submodules
- git submodule update --init --recursive
- #Only care if we actually updated
- if [ ${current_head} != $(git rev-parse HEAD) ]; then
- # Go to templates
- cd ${ZIM_HOME}/Templates
- # Create diff var
- diff=$(git diff HEAD~1 HEAD ./*)
- #Only show changes if templates have changed
- if [ ! -z ${diff} ]; then
- echo "Please review the following changes to Zim's default configuration:"
- echo ${diff}
- fi
- fi
Add Comment
Please, Sign In to add comment