mdserver-web/plugins/csvn/hook/commit.tpl

23 lines
425 B
Smarty
Raw Permalink Normal View History

2018-12-13 07:01:29 -05:00
#!/bin/bash
2018-12-14 02:20:11 -05:00
export LC_ALL=en_US.UTF-8
export LC_CTYPE=zh_CN.UTF-8
2018-12-13 07:01:29 -05:00
REPOS="$1"
REV="$2"
TXN_NAME="$3"
2018-12-13 10:05:55 -05:00
WEB_PATH={$PROJECT_DIR}/wwwroot/$REPOS
2018-12-13 07:01:29 -05:00
SVN_PATH=http://127.0.0.1:{$PORT}/svn/$REPOS
if [ ! -d $WEB_PATH ]; then
2018-12-13 09:37:27 -05:00
svn co $SVN_PATH $WEB_PATH \
--username={$CSVN_USER} \
--password={$CSVN_PWD} \
--no-auth-cache \
--non-interactive
2018-12-13 07:01:29 -05:00
fi
cd $WEB_PATH && svn update --username={$CSVN_USER} --password={$CSVN_PWD}