Update README. Give novice advice in git-to-steve.sh
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sat, 14 Jan 2012 05:29:29 +0000 (00:29 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sat, 14 Jan 2012 05:29:29 +0000 (00:29 -0500)
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
contrib/README
contrib/git-to-steve.sh

index b99a846..0999b12 100644 (file)
@@ -61,6 +61,13 @@ This script will not send an email on a "fast-forward" or "merge"
 commit, so that you won't bother Steve if you keep a long lived
 for-steve branch, and even share it accross machines...
 
+To use, just place it under the name post-receive in the hooks
+directory of your git public repository.
+
+You may wish to review it and make sure the branch(es) you want to
+send mail for are there and the location of the post-receive-email
+script which should come with your git install.
+
 Nelson Ferreira <njsf@sxemacs.org>
 
 
index 5876eeb..7e59376 100755 (executable)
@@ -44,3 +44,42 @@ if [ -z "$USER_NAME" ]; then
 fi
 git branch --track for-steve origin/master
 git checkout for-steve
+echo ""
+SIGNKEY=$(git config user.signingkey)
+if [ -z "$SIGNKEY" ]; then
+    echo "OPTIONAL: You might wish to setup your GPG signing key:"
+    echo "    git config user.signingkey <GPG key signature>"
+fi
+CO_ALIAS=$(git config alias.co)
+if [ -z "$CO_ALIAS" ]; then
+    echo "RECOMMENDED: It is recommended you define the 'co' alias"
+    echo "             to quickly switch betwen the master and "
+    echo "             for-steve branches."
+    echo "    git config alias.co checkout"
+fi
+REMOTE=$(git remote | grep -v origin)
+if [ -z "$REMOTE" ]; then
+    echo "MANDATORY: You now must configure your remote repository "
+    echo "           location using:"
+    echo "    git remote <myremote> <repository location>"
+    echo ""
+    echo "           We recommend that you use 'myremote' explicitly"
+    echo "           for the remote name, but it can be whatever name"
+    echo "           you wish, except origin"
+    echo "           The repository location can be either a git server"
+    echo "               git://example.com/sxemacs.git"
+    echo "           or an ssh accessible location:"
+    echo "               ssh://user@example.com/~/path/to/git"
+    echo "           in this last case it is VERY convenient that you "
+    echo "           setup SSH public key authentication."
+else
+    echo "Please verify that one of these remotes is for your SXEmacs "
+    echo "public repository"
+    for r in $REMOTE; do
+       git remote show $r
+    done
+fi
+echo ""
+echo "Make sure to read the SPPM for more information."
+echo "Info node: (sppm)Setting up a publicly accessible repo"
+echo ""