taking out /etc/alternatives
[feisty_meow.git] / scripts / rev_control / push_repo_upstream.sh
old mode 100755 (executable)
new mode 100644 (file)
index 5b99f3b..a92ed74
@@ -9,18 +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
-certfile="$1"; shift
-if [ -z "$certfile" ]; then
-  certfile=$HOME/.ssh/id_dsa_sourceforge
+
+# 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
-git push -i "$certfile" origin master
+unset GIT_SSH
+git push origin master <"$PASSWORD_FILE"
 popd
+
+