X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Frev_control%2Fpush_repo_upstream.sh;h=a92ed74a2af460d7ecb4dbfeb286f762018a3c6c;hb=0aa01e5d93c298d938a2e9930e9e48151a8299ef;hp=3d69f95f63f6cec3c853e122c07091668d9938dd;hpb=1abc7c0a32c98db6dfbc0ceadbc30a72c54bb13e;p=feisty_meow.git diff --git a/scripts/rev_control/push_repo_upstream.sh b/scripts/rev_control/push_repo_upstream.sh old mode 100755 new mode 100644 index 3d69f95f..a92ed74a --- a/scripts/rev_control/push_repo_upstream.sh +++ b/scripts/rev_control/push_repo_upstream.sh @@ -9,9 +9,38 @@ # # rats: how did i set up that archive? # we need to have those steps someplace. +# the remote config is like this so far: +# +#fred@serene $ git remote -v +#origin ssh://fred_t_hamster@git.code.sf.net/p/feistymeow/trunk (fetch) +#origin ssh://fred_t_hamster@git.code.sf.net/p/feistymeow/trunk (push) +#upstream git@feistymeow.org:feisty_meow (fetch) +#upstream git@feistymeow.org:feisty_meow (push) +# +# so, we've got it hooked together with a named remote called "upstream" that is +# actually our source location, and the target is actually the "origin" remote for +# the repository. + + +dir="$1"; shift +if [ -z "$dir" ]; then + dir=. +fi + +# this file needs to have our sourceforge password in it. +PASSWORD_FILE="$HOME/.secrets/sourceforge_password" + +if [ ! -f "$PASSWORD_FILE" ]; then + echo "This script requires a password stored in the file:" + echo " $PASSWORD_FILE" + exit 1 +fi +pushd "$dir" git fetch upstream git merge upstream/master +unset GIT_SSH +git push origin master <"$PASSWORD_FILE" +popd -git push origin master