Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
6e5f15d8
Commit
6e5f15d8
authored
16 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
switch to using rsync and use new functions
parent
de0269c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/zmap_update_web.sh
+95
-11
95 additions, 11 deletions
scripts/zmap_update_web.sh
with
95 additions
and
11 deletions
scripts/zmap_update_web.sh
+
95
−
11
View file @
6e5f15d8
...
...
@@ -10,9 +10,11 @@ else
BASE_DIR
=
$SCRIPT_DIR
fi
.
$BASE_DIR
/zmap_functions.sh
||
{
echo
"Failed to load zmap_functions.sh"
;
exit
1
;
}
.
$BASE_DIR
/zmap_functions.sh
||
{
echo
"Failed to load zmap_functions.sh"
;
exit
1
;
}
set
-o
history
.
$BASE_DIR
/build_config.sh
||
{
echo
"Failed to load build_config.sh"
;
exit
1
;
}
.
$BASE_DIR
/build_config.sh
||
{
echo
"Failed to load build_config.sh"
;
exit
1
;
}
.
$BASE_DIR
/zmap_functions_web.sh
||
{
echo
"Failed to load zmap_functions_web.sh"
;
exit
1
;
}
zmap_message_out
"Start of script."
...
...
@@ -20,16 +22,20 @@ zmap_message_out "Running in $INITIAL_DIR on $(hostname) under $(uname)"
zmap_message_out
"cmd line options = '
$*
'"
ZMAP_BUILD_CONTAINER
=
$1
zmap_check
${
ZMAP_BUILD_CONTAINER
:
=
$INITIAL_DIR
}
# including VARIABLE=VALUE settings from command line
if
[
$#
-gt
0
]
;
then
eval
"
$*
"
fi
# These defaults should probably _not_ be here!
zmap_check
${
ZMAP_WEBSITE_TARGET
:
=/nfs/WWWdev/SANGER_docs/htdocs/Software/analysis/ZMap
}
zmap_check
${
WEBUSER
:
=zmap
}
zmap_check
${
WEBHOST
:
=cbi4
}
zmap_cd
$ZMAP_BUILD_CONTAINER
zmap_cd
$BASE_DIR
zmap_goto_cvs_module_root
zmap_message_out
"Using
$ZMAP_WEBSITE_TARGET
as website directory."
...
...
@@ -44,33 +50,111 @@ if [ "x$ZMAP_MASTER_DOCS2WEB" == "x$ZMAP_TRUE" ]; then
mkdir
-p
$LOCAL_WEBSITE_TARGET
rm
-rf
$LOCAL_WEBSITE_TARGET
/
*
for
dir
in
$ZMAP_WEBSITE_SOURCE_DIRS
;
do
if
!
echo
$dir
| egrep
"(^)/"
;
then
this_dir
=
$(
pwd
)
zmap_cd
$dir
cd
$dir
||
{
end_dir
=
$(
basename
$dir
)
parent
=
$(
dirname
$dir
)
location
=
$(
find
.
-name
$end_dir
|
grep
$parent
)
if
[
"x
$location
"
!=
"x"
]
;
then
zmap_message_out
"Found
$end_dir
@
$location
"
dir
=
$location
zmap_cd
$dir
else
zmap_message_exit
"
$dir
was not found"
fi
}
dir
=
$(
pwd
)
zmap_cd
$this_dir
fi
zmap_message_out
"Copying (
$dir
/*) to temporary local target (
$LOCAL_WEBSITE_TARGET
/). "
zmap_message_out
"Files:"
find
$dir
/
-mindepth
1
#
find $dir/ -mindepth 1
find
$LOCAL_WEBSITE_TARGET
-type
d | xargs
-r
chmod
755
find
$LOCAL_WEBSITE_TARGET
-type
f | xargs
-r
chmod
644
# First we copy to the local one. We can release this later
cp
-r
$dir
/
*
$LOCAL_WEBSITE_TARGET
rsync
-r
$dir
/
$LOCAL_WEBSITE_TARGET
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
zmap_message_out
"Starting to process Release notes directory to create index"
process_release_notes_files_for_web
$LOCAL_WEBSITE_TARGET
zmap_message_out
"Finished processing Release notes"
fi
if
[
"x
$EXPAT_HTML_DOC_LOCATION
"
!=
"x"
]
;
then
if
[
-d
$EXPAT_HTML_DOC_LOCATION
]
;
then
mkdir
$LOCAL_WEBSITE_TARGET
/expat
||
\
zmap_message_exit
"Failed to make expat dir in
$LOCAL_WEBSITE_TARGET
"
zmap_message_out
"Copying Expat docs..."
cp
-r
$EXPAT_HTML_DOC_LOCATION
/
*
$LOCAL_WEBSITE_TARGET
/expat/
zmap_message_out
"Removing and recreating index.html [soft link]"
rm
-f
$LOCAL_WEBSITE_TARGET
/expat/index.html
cp
$LOCAL_WEBSITE_TARGET
/expat/reference.html
$LOCAL_WEBSITE_TARGET
/expat/index.html
cat
>>
$LOCAL_WEBSITE_TARGET
/expat/index.shtml
<<
EXPAT
<!-- Auto generated by
$0
. Do not edit! -->
<!--#include virtual="/perl/header"-->
<iframe src="index.html"
height="600px"
width="100%"
frameborder="0"
scrolling="auto"
name="expat"
id="expat"></iframe>
<!--#include virtual="/perl/footer"-->
EXPAT
echo
"# Auto generated by
$0
. Do not edit!"
>
$LOCAL_WEBSITE_TARGET
/expat/this_links.ini
echo
"Expat [sf]=http://expat.sourceforge.net"
>>
$LOCAL_WEBSITE_TARGET
/expat/this_links.ini
else
zmap_message_err
"Did not find Expat docs in '
$EXPAT_HTML_DOC_LOCATION
'"
fi
else
zmap_message_err
"
\$
EXPAT_HTML_DOC_LOCATION not set. Cannot copy Expat docs."
fi
# Make all the header.ini files
make_header_ini
$LOCAL_WEBSITE_TARGET
zmap_message_out
"Now copying the whole local webroot to
$ZMAP_WEBSITE_TARGET
"
zmap_message_out
"Running scp -r
$LOCAL_WEBSITE_TARGET
/*
$WEBUSER
@
$WEBHOST
:
$ZMAP_WEBSITE_TARGET
/"
zmap_message_out
"Running rsync -r
$LOCAL_WEBSITE_TARGET
/*
$WEBUSER
@
$WEBHOST
:
$ZMAP_WEBSITE_TARGET
/"
PRODUCTION
=
yes
if
[
"x
$PRODUCTION
"
==
"xyes"
]
;
then
scp
-r
$LOCAL_WEBSITE_TARGET
/
*
$WEBUSER
@
$WEBHOST
:
$ZMAP_WEBSITE_TARGET
/
||
zmap_message_exit
"Secure Copy Failed."
zmap_message_out
"Password prompt requires password for
$WEBUSER
"
export
RSYNC_RSH
=
"ssh"
(
cat
<<
EXCLUDE
*.md5
*.int
*.README
*.tag
EXCLUDE
)
| rsync
-r
--exclude-from
=
-
--cvs-exclude
--delete-excluded
$LOCAL_WEBSITE_TARGET
/
$WEBUSER
@
$WEBHOST
:
$ZMAP_WEBSITE_TARGET
/
||
\
zmap_message_exit
"Secure Copy Failed."
fi
find
$LOCAL_WEBSITE_TARGET
-type
d | xargs
-r
chmod
755
find
$LOCAL_WEBSITE_TARGET
-type
f | xargs
-r
chmod
644
fi
if
[
"x
$ZMAP_MASTER_WEBPUBLISH
"
==
"x
$ZMAP_TRUE
"
]
;
then
zmap_check
${
WEBPUBLISH
:
=webpublish
}
# -t is for test apparently....
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment