e2c8755e9c2d020c4df6f8910c0a58a2fc2fe84e
[feisty_meow.git] / scripts / site_avenger / clean_mapsdemo.sh
1 #!/bin/bash
2
3 # some code i wrote to add to revamp that turned out to be unsuitable.
4 # but it corrects a problem in cakelampvm v002 release that i find annoying,
5 # so here it is as its own file.
6
7 # clean out some old files that were not checked in in mapsdemo.
8 echo Doing some git repository maintenance in fred account.
9 #
10 # change over to fred folder
11 pushd /home/fred
12 exit_on_error "changing dir to fred's home; what have you done with fred?"
13
14 pushd apps/mapsdemo/avenger5
15 exit_on_error "changing dir to mapsdemo app"
16
17 rpuffer . &>/dev/null
18 if [ $? -ne 0 ]; then
19   # it seems our old files are still conflicting this.
20   if [ -f config/config_google.php ]; then
21     \rm -f config/config_google.php
22     exit_on_error "removing old config for google"
23   fi
24   if [ -f config/app.php ]; then
25     \rm -f config/app.php
26     exit_on_error "removing old config for app"
27   fi
28
29   git reset --hard HEAD
30   exit_on_error "resetting git's hard head"
31
32   rpuffer .
33 #hmmm: use output saver thing when that exists.
34   exit_on_error "puffing out mapsdemo app after inadequate corrective action was taken"
35 fi
36
37 popd
38
39 popd
40 #...coolness, if we got to here.
41
42