new script for careful git update
[feisty_meow.git] / scripts / rev_control / rfluffer.sh
1 #!/bin/bash
2
3 # this "fluffs 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 fluff 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 fluffing 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 ##############
15
16 dir="$1"; shift
17 if [ -z "$dir" ]; then
18   dir=.
19 fi
20
21 pushd "$dir" &>/dev/null
22 test_or_die "changing to directory: $dir"
23 tempfile=$(generate_rev_ctrl_filelist)
24 test_or_die "generating revision control file list"
25 popd &>/dev/null
26
27 perform_revctrl_action_on_file "$tempfile" do_careful_git_update
28 test_or_die "fluffing out repository at: $tempfile"
29