more refactoring of revision control scripts
[feisty_meow.git] / scripts / rev_control / compact_git.sh
index 8de72543f7ad3c969e597499ffed720e0a9e50bf..c1a22ef0b5c45d41cfcddd3764aa61ed88a97d5d 100644 (file)
@@ -2,16 +2,28 @@
 
 # compresses the git archive in the folder specified.
 
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh"
+
+##############
+
 prune_dir="$1"
 if [ -z "$prune_dir" ]; then
   prune_dir="$(pwd)"
 fi
-pushd "$prune_dir"
+pushd "$prune_dir" &>/dev/null
+test_or_die "changing to directory: $prune_dir"
+
 echo "cleaning git repo in directory $(pwd)"
+
 git fsck --full
 test_or_die "git fsck"
+
 git gc --prune=today --aggressive
 test_or_die "git gc"
+
 git repack
 test_or_die "git repack"
-popd
+
+popd &>/dev/null
+