499be1e252e75390ae5e00d39dff4829a35a294f galt Mon Mar 9 17:03:26 2020 -0700 fix browserSetup.sh update to match the documentation. Allows user to specify a list of assemblies to update, or leave blank to update all assemblies. refs #rm25111. diff --git src/product/installer/browserSetup.sh src/product/installer/browserSetup.sh index 803b0ec..ce52b73 100644 --- src/product/installer/browserSetup.sh +++ src/product/installer/browserSetup.sh @@ -363,31 +363,31 @@ parameters for 'minimal', 'mirror' and 'update': <assemblyList> - download Mysql + /gbdb files for a space-separated list of genomes examples: bash $0 install - install Genome Browser, do not download any genome assembly, switch to on-the-fly mode (see the -f option) bash $0 minimal hg19 - download only the minimal tables for the hg19 assembly bash $0 mirror hg19 mm9 - download hg19 and mm9, switch to offline mode (see the -o option) bash $0 -t noEncode mirror hg19 - install Genome Browser, download hg19 but no ENCODE tables and switch to offline mode (see the -o option) bash $0 update hg19 - update all data and all tables of the hg19 assembly - (in total 7TB) + (in total 7TB). Specifying no assemblies will update all assemblies. bash $0 cgiUpdate - update the Genome Browser CGI programs bash $0 clean - remove temporary files older than one day All options have to precede the command. options: -a - use alternative download server at SDSC -b - batch mode, do not prompt for key presses -t - For the "mirror" command: Track selection, requires a value. This option is only useful for Human/Mouse assemblies. Download only certain tracks, possible values: noEncode = do not download any tables with the wgEncode prefix, except Gencode genes, saves 4TB/6TB for hg19 bestEncode = our ENCODE recommendation, all summary tracks, saves 2TB/6TB for hg19 @@ -1613,32 +1613,37 @@ function cgiUpdate () { # update the CGIs $RSYNC -avzP --exclude=RNAplot --exclude=hg.conf --exclude=hg.conf.local --exclude=RNAplot $HGDOWNLOAD::cgi-bin/ $APACHEDIR/cgi-bin/ # update the html docs echo2 Updating Apache htdocs $RSYNC -avzP --exclude=*.{bb,bam,bai,bw,gz,2bit,bed} --exclude=ENCODE --exclude=trash $HGDOWNLOAD::htdocs/ $APACHEDIR/htdocs/ # assign all downloaded files to a valid user. chown -R $APACHEUSER:$APACHEUSER $APACHEDIR/* } function updateBrowser { cgiUpdate echo - # update gbdb + DBS=$* + # if none specified, update all + if [ "$DBS" == "" ] ; then DBS=`ls $GBDBDIR/` + fi + + # update gbdb echo updating GBDB: $DBS for db in $DBS; do echo2 syncing gbdb: $db rsync -avp $RSYNCOPTS $HGDOWNLOAD::gbdb/$db/ $GBDBDIR/$db/ done # update the mysql DBs stopMysql DBS=`ls /var/lib/mysql/ | egrep -v '(Trash$)|(hgTemp)|(^ib_)|(^ibdata)|(^aria)|(^mysql)|(performance)|(.flag$)|(hgcentral)'` for db in $DBS; do echo2 syncing full mysql database: $db $RSYNC --update --progress -avp $RSYNCOPTS $HGDOWNLOAD::mysql/$db/ $MYSQLDIR/$db/ done startMysql @@ -1820,28 +1825,28 @@ fi if [ "${1:-}" == "install" ]; then installBrowser elif [ "${1:-}" == "minimal" ]; then downloadMinimal ${@:2} # all arguments after the second one elif [ "${1:-}" == "mirror" ]; then downloadGenomes ${@:2} # all arguments after the second one elif [ "${1:-}" == "cgiUpdate" ]; then cgiUpdate elif [ "${1:-}" == "update" ]; then - updateBrowser + updateBrowser ${@:2} # all arguments after the second one elif [ "${1:-}" == "clean" ]; then cleanTrash elif [ "${1:-}" == "addTools" ]; then addTools else echo Unknown command: $1 echo "$HELP_STR" exit 1 fi