Skip to content
Snippets Groups Projects
Commit 2699ec1d authored by rds's avatar rds
Browse files

Copy single files too...

parent 4abd2fe9
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,12 @@ EXPAT_HTML_DOC_LOCATION=/usr/share/doc/libexpat1-dev/expat.html
#
ZMAP_WEBSITE_SOURCE_DIRS="docs/ZMap doc web"
# ZMAP_WEBSITE_SINGLE_FILES is a list of files which need to be copied across too.
# format is "from_location:to_location from_location1:to_location1 from_location2:to_location2"
# As with above from_location needs to relative to build container
# to_location needs to be in one of trees in ZMAP_WEBSITE_SOURCE_DIRS if it involves directories
ZMAP_WEBSITE_SINGLE_FILES="src/zmapServer/acedb/models.wrm:user_doc/models.wrm.shtml"
WEBROOT=/nfs/WWWdev/SANGER_docs/htdocs
WEBUSER=zmap
# Should be the machine where /nfs/WWWdev is exported!
......
......@@ -60,6 +60,8 @@ if [ "x$ZMAP_MASTER_DOCS2WEB" == "x$ZMAP_TRUE" ]; then
for dir in $ZMAP_WEBSITE_SOURCE_DIRS;
do
zmap_message_out "dir='$dir'"
if ! echo $dir | egrep "(^)/" ; then
this_dir=$(pwd)
cd $dir || {
......@@ -72,22 +74,26 @@ if [ "x$ZMAP_MASTER_DOCS2WEB" == "x$ZMAP_TRUE" ]; then
zmap_cd $dir
else
zmap_message_exit "$dir was not found"
zmap_message_err "$dir was not found, continuing..."
continue
fi
}
dir=$(pwd)
zmap_cd $this_dir
fi
this_dir=$(pwd)
zmap_cd $dir
if [ -d CVS ]; then
zmap_message_out "Found '$dir/CVS' so cvs update -C $dir"
cvs update -C
else
zmap_message_out "*** $dir not under cvs control ***"
if [ "x$USER" == "x$WEBUSER" ]; then
this_dir=$(pwd)
zmap_cd $dir
if [ -d CVS ]; then
zmap_message_out "Found '$dir/CVS' so cvs $CVS_OPTION update -C $dir"
cvs $CVS_OPTION update -C
else
zmap_message_out "*** $dir not under cvs control ***"
fi
zmap_cd $this_dir
fi
zmap_cd $this_dir
zmap_message_out "Copying ($dir/*) to temporary local target ($LOCAL_WEBSITE_TARGET/). "
zmap_message_out "Files:"
# find $dir/ -mindepth 1
......@@ -102,6 +108,30 @@ if [ "x$ZMAP_MASTER_DOCS2WEB" == "x$ZMAP_TRUE" ]; then
find $LOCAL_WEBSITE_TARGET -type f | xargs -r chmod 644
done
for from_to in $ZMAP_WEBSITE_SINGLE_FILES;
do
SAVE_IFS=$IFS
IFS=":"
i=0
for file in $from_to
do
array[$i]=$file
#echo "file = '$file' or from array $i '${array[$i]}'"
let i=$i+1
done
IFS=$SAVE_IFS
echo "running rsync ${array[0]} $LOCAL_WEBSITE_TARGET/${array[1]}"
rsync ${array[0]} $LOCAL_WEBSITE_TARGET/${array[1]}
find $LOCAL_WEBSITE_TARGET -type d | xargs -r chmod 755
find $LOCAL_WEBSITE_TARGET -type f | xargs -r chmod 644
done
update_release_notes_index=$ZMAP_TRUE
if [ "x$update_release_notes_index" == "x$ZMAP_TRUE" ]; then
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment