summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber.mailing@gmail.com>2006-08-24 20:32:30 +0200
committerbeber <beber@meathook.melee>2006-08-24 20:32:30 +0200
commit55223946cee0aa3c7636729aa9392ad70f65142c (patch)
tree7376439e68388bbcd412410a20cbacb646122628
parentfuck c'est moche, mais ca marche (diff)
downloadperso-55223946cee0aa3c7636729aa9392ad70f65142c.tar.gz
update email adress
-rwxr-xr-xgit/hooks/post-update2
-rwxr-xr-xgit/hooks/pre-update2
-rwxr-xr-xgit/hooks/update4
-rwxr-xr-xsvn/hooks/post-update78
-rw-r--r--test_socket/test.c2
5 files changed, 83 insertions, 5 deletions
diff --git a/git/hooks/post-update b/git/hooks/post-update
index ec71a56..72eb70e 100755
--- a/git/hooks/post-update
+++ b/git/hooks/post-update
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# (c) 2006 Bertrand Jacquin <beber.mailing@gmail.com>
+# (c) 2006 Bertrand Jacquin <beber_AT_meleeweb.net>
# Update server-info (for gitweb)
git update-server-info
diff --git a/git/hooks/pre-update b/git/hooks/pre-update
index 669219e..cd42ca3 100755
--- a/git/hooks/pre-update
+++ b/git/hooks/pre-update
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# (c) 2006 Bertrand Jacquin <beber.mailing@gmail.com>
+# (c) 2006 Bertrand Jacquin <beber_AT_meleeweb.net>
# Change rights for apache users
# 2664 for files
diff --git a/git/hooks/update b/git/hooks/update
index cf92708..53a5ae7 100755
--- a/git/hooks/update
+++ b/git/hooks/update
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# (c) 2006 Bertrand Jacquin <beber.mailing@gmail.com>
+# (c) 2006 Bertrand Jacquin <beber_AT_meleeweb.net>
#
# Depends on :
# git http://kernel.org/pub/software/scm/git/docs/
@@ -15,7 +15,7 @@
# Config
gitweburl="http://guybrush.ath.cx/gitweb" # Git web URL, can be empty if no gitweb, so mail will not contain any URL link.
-maintainer="beber.mailing@gmail.com" # Maintainer email for bugs reports, can be empty too
+maintainer="beber@meleeweb.net" # Maintainer email for bugs reports, can be empty too
mailprefix="Melee:" # Prefix for mail
smtpserver="localhost" # SMTP server address (default is localhost)
mailonlyforrefs=( "master" "pr/my_passwd" ) # Track and send mail for only theses refs. It can be multiple (ex: mailonlyforrefs=( "master" "upstream" )
diff --git a/svn/hooks/post-update b/svn/hooks/post-update
new file mode 100755
index 0000000..7f44fb1
--- /dev/null
+++ b/svn/hooks/post-update
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# POST-COMMIT HOOK
+#
+# The post-commit hook is invoked after a commit. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-commit' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REV (the number of the revision just committed)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the commit has already completed and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# newly-committed tree.
+#
+# On a Unix system, the normal procedure is to have 'post-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-commit.bat' or 'post-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+SVN_PATH="$1"
+SVN_LAST_REV="$2"
+
+GIT_PATH=/var/git/public/school/PFE.git
+GIT_PATH_UNSLASH="$(echo $GIT_PATH | sed -s 's;/;-;g' | cut -c 2-)"
+
+GIT_COMMITER_NAME="SVN post-commit hook"
+GIT_COMMITER_EMAIL="apache@guybrush.ath.cx"
+
+#[ ! -d /var/git-svn/${GIT_PATH_UNSLASH} ] && mkdir -p /var/git-svn/${GIT_PATH_UNSLASH}
+
+if [ ! -d /var/git-svn/${GIT_PATH_UNSLASH}/.git ]; then
+ cg-clone ${GIT_PATH} /var/git-svn/${GIT_PATH_UNSLASH}
+ cd /var/git-svn/${GIT_PATH_UNSLASH}
+else
+ cd /var/git-svn/${GIT_PATH_UNSLASH}
+ cg-update
+fi
+
+svn co file://${SVN_PATH} .
+export GIT_AUTHOR_NAME="$(svn log -r ${SVN_LAST_REV} --xml | grep author | sed -r 's;<author>(.*)</author>;\1;')"
+export GIT_AUTHOR_EMAIL="${GIT_AUTHOR_NAME}@guybrush.ath.cx"
+GIT_COMMIT_MESSAGE="$(svn log -r ${SVN_LAST_REV} | tail -n +4 | head -n -1)"
+
+cg-status
+FILES_TO_ADD="$(cg-status | grep '^?' | awk '{print $2}')"
+FILES_TO_DEL="$(cg-status | grep '^!' | awk '{print $2}')"
+
+[ ! -z "${FILES_TO_ADD}" ] && cg-add ${FILES_TO_ADD}
+[ ! -z "${FILES_TO_DEL}" ] && cg-rm ${FILES_TO_DEL}
+
+cg-commit -m "${GIT_COMMIT_MESSAGE}"
+cg-push
diff --git a/test_socket/test.c b/test_socket/test.c
index f83c594..5121b96 100644
--- a/test_socket/test.c
+++ b/test_socket/test.c
@@ -1,4 +1,4 @@
- /* Par Beber <beber@setibzh.com>
+ /* Par Beber <beber_AT_meleeweb.net>
* 04/08/2004 - Tard
* Pour notre réseau IRC
*/