3 # Author: Kevin Wentworth
4 # Author: Chris Koeritz
6 # updates a site avenger app.
8 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory.
10 ############################
12 # main body of script.
14 # check for parameters.
15 app_dirname="$1"; shift
18 source "$WORKDIR/shared_site_mgr.sh"
22 check_application_dir "$APPLICATION_DIR"
24 # find proper webroot where the site will be initialized.
25 if [ -z "$app_dirname" ]; then
26 # no dir was passed, so guess it.
27 find_app_folder "$APPLICATION_DIR"
29 test_app_folder "$APPLICATION_DIR" "$app_dirname"
32 # where we expect to find our checkout folder underneath.
33 full_app_dir="$APPLICATION_DIR/$app_dirname"
35 # use our default values for the repository and theme if they're not provided.
36 if [ -z "$repo_name" ]; then
37 repo_name="$app_dirname"
40 echo "Repository: $repo_name"
43 # this should set the site_store_path variable if everything goes well.
44 update_repo "$full_app_dir" "$CHECKOUT_DIR_NAME" "$DEFAULT_REPOSITORY_ROOT" "$repo_name"
45 test_or_die "Updating the repository storage directory"
51 echo "Finished updating the site in ${app_dirname}."