cleaning out references to avenger5 text
[feisty_meow.git] / scripts / site_avenger / avcoreup.sh
1 #!/bin/bash
2
3 # Author: Kevin Wentworth
4 # Author: Chris Koeritz
5
6 # updates just the site avenger core portion of an app.
7
8 export THISDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
9
10 ############################
11
12 # main body of script.
13
14 # check for parameters.
15 app_dirname="$1"; shift
16
17 source "$THISDIR/shared_site_mgr.sh"
18
19 sep
20
21 check_apps_root "$app_dirname"
22
23 # find proper webroot where the site will be initialized.
24 if [ -z "$app_dirname" ]; then
25   # no dir was passed, so guess it.
26   find_app_folder "$BASE_APPLICATION_PATH"
27 else
28   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
29 fi
30 exit_on_error "finding and testing app folder"
31
32 # where we expect to find our checkout folder underneath.
33 full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
34
35 # simplistic approach here; just go to the folder and pull the changes.
36
37 pushd "$full_app_dir" &>/dev/null
38 exit_on_error "Changing to app path '$full_app_dir'"
39
40 dir="$CHECKOUT_DIR_NAME/vendor/siteavenger/avcore"
41 if [ ! -d $dir ]; then
42   echo "The application doesn't seem to use avcore: $full_app_dir"
43 else
44   pushd "$dir" &>/dev/null
45
46   git pull
47   exit_on_error "Pulling git repo for avcore under '$full_app_dir'"
48
49   echo "Finished updating the avcore portion of site in ${app_dirname}."
50
51   popd &>/dev/null
52 fi
53
54 popd &>/dev/null
55
56 sep
57