new fortune
[feisty_meow.git] / scripts / rev_control / rpuffer.sh
1 #!/bin/bash
2
3 # this "puffs out" the repositories that it finds.  what this means is that
4 # any git repositories found will have all of their remote state updated (by
5 # pulling all remote repos).  this ensures that any upstream changes get
6 # merged into the local branch.
7 # it's better to puff out your code regularly rather than waiting for a huge
8 # merge snarl later.  note that if you check in the code frequently with the
9 # feisty meow scripts, that will also take care of puffing out the code.
10
11 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
12 source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh"
13
14 save_terminal_title
15
16 ##############
17
18 dir="$1"; shift
19 if [ -z "$dir" ]; then
20   dir=.
21 fi
22
23 pushd "$dir" &>/dev/null
24 exit_on_error "changing to directory: $dir"
25 tempfile=$(generate_rev_ctrl_filelist)
26 exit_on_error "generating revision control file list"
27 popd &>/dev/null
28
29 perform_revctrl_action_on_file "$tempfile" do_revctrl_careful_update
30 exit_on_error "puffing out repository at: $tempfile"
31
32 restore_terminal_title
33