Skip to content

Commit

Permalink
Merge pull request #328 from cschneemann/publisher_hook_example
Browse files Browse the repository at this point in the history
Fixed example Scripts for publisher hook
  • Loading branch information
rubhanazeem authored Feb 28, 2024
2 parents 87e4f4e + e89bc01 commit 76e930f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xml/obs_ag_publish_hooks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ our $publishedhook = {
OBSHOME="/srv/obs"
SRC_REPO_DIR="$OBSHOME/repos"
LOGFILE="$OBSHOME/log/reposync.log"
$DST_REPO_DIR="/srv/repo-mirror"
DST_REPO_DIR="/srv/repo-mirror"
# Global substitution! To handle strings like Foo:Bar:testing - two
#+double-colons!
PRJ_PATH=${1//:/:\/}
PATH_TO_REPO=$2
rsync -a --log-file=$LOGFILE $PATH_TO_REPO/ $DST_REPO_DIR/$PRJ_PATH/</screen>
rsync -a --log-file=$LOGFILE --mkpath $PATH_TO_REPO/ $DST_REPO_DIR/$PRJ_PATH/</screen>
<para>For testing purposes, it can be invoked as follows:</para>
<screen>$ sudo -u obsrun /usr/local/bin/publish-hook.sh Product/SLES11-SP1 \
/srv/obs/repos/Product/SLE11-SP1</screen>
Expand All @@ -132,7 +132,7 @@ DST_REPO_DIR=$1
PRJ_PATH=${2//:/:\/}
PATH_TO_REPO=$3
mkdir -p $DST_REPO_DIR/$PRJ_PATH
rsync -a --log-file=$LOGFILE $PATH_TO_REPO/ $DST_REPO_DIR/$PRJ_PATH/</screen>
rsync -a --log-file=$LOGFILE --mkpath $PATH_TO_REPO/ $DST_REPO_DIR/$PRJ_PATH/</screen>
<para>For testing purposes, it can be invoked as follows:</para>
<screen>$ sudo -u obsrun /usr/local/bin/publish-hook.sh \
/srv/www/public_mirror/Product/SLES11-SP1 \
Expand Down

0 comments on commit 76e930f

Please sign in to comment.