X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsite_avenger%2Fsitepush.sh;h=79156ea2ac76bb02e1ea1c28e2c0748321a4d552;hb=dd74823e9ff7b8b8cdfb709211f06d3e95bcdc83;hp=99a8cbefb9ce1d4460fd7ff5309d53b3d21b6cba;hpb=46da48836dd0d44a6f7a9129b516d5a5eb2fe223;p=feisty_meow.git diff --git a/scripts/site_avenger/sitepush.sh b/scripts/site_avenger/sitepush.sh index 99a8cbef..79156ea2 100644 --- a/scripts/site_avenger/sitepush.sh +++ b/scripts/site_avenger/sitepush.sh @@ -6,10 +6,6 @@ # checks the chosen site into the online git repository. export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. -source "$WORKDIR/shared_site_mgr.sh" - -# get our defaults. -source "$WORKDIR/site_avenger.config" ############################ @@ -19,6 +15,8 @@ source "$WORKDIR/site_avenger.config" app_dirname="$1"; shift repo_name="$1"; shift +source "$WORKDIR/shared_site_mgr.sh" + sep check_application_dir "$APPLICATION_DIR" @@ -44,7 +42,7 @@ sep # this should set the site_store_path variable if everything goes well. update_repo "$full_app_dir" "$CHECKOUT_DIR_NAME" "$DEFAULT_REPOSITORY_ROOT" "$repo_name" -check_result "Updating the repository storage directory" +test_or_die "Updating the repository storage directory" sep @@ -61,33 +59,3 @@ sep echo "Finished checking in the site at ${app_dirname}." - - - - - -echo bailing before deprecated code is run.; exit 0 - - -# see if there are any unmerged files, if so, do not try to push files -if [[ `git ls-files -u` ]]; then - echo "Git: local changes!" - echo "Aborting. Please resolve manually and re-run this script" -else - # http://stackoverflow.com/questions/5143795/how-can-i-check-in-a-bash-script-if-my-local-git-repo-has-changes - # see if there are any new files that need pushing (status will show new files) - if [[ `git status --porcelain` ]]; then - # changes - git add . -A - git commit -m "SERVER. Adding user uploaded files. [via sitepush]" - git push origin master - echo "Git: changes pushed to [master]" - else - # no changes - echo "Git: nothing to push. [master] up to date." - fi -fi - -#### - -