Hi,
I have a post-commit hook in svn that runs fine from the command line when I run
env - ./foo.sh /path/to/svn/repos/ 12345
but when it the script is called from svn it does not appear to work.
What I am basically doing is checking the committed files and if a particular file is modified, i do an svn export of it to a network share. Works fine from the command line
The post-commit script is as follows:
#!/bin/sh
REPOS="$1"
REV="$2"
CHANGED=`/usr/bin/svnlook changed -r "$REV" "$REPOS"`
SOURCE="svn+ssh://localhost/path/to/svn/repos/somefile.zip"
DEST="/mnt/build/somefile-r$REV.zip"
if [[ "$CHANGED" =~ "trunk/somedir/somefile.zip" ]]
then
`/usr/bin/svn export --non-interactive --trust-server-cert $SOURCE $DEST`
fi
exit 0
is there a way to output any error messages to a file when the script runs, or specifically the svn export line (where I think there might be an issue)?
thanks