efd06ae9f3a86f106ac1a8b3b633f384a1a223fe max Wed Oct 4 12:38:47 2017 -0700 allowing extTools.ra to live outside the cgi-bin directory diff --git src/hg/hgTracks/extTools.c src/hg/hgTracks/extTools.c index 2e37162..b01cb0d 100644 --- src/hg/hgTracks/extTools.c +++ src/hg/hgTracks/extTools.c @@ -19,31 +19,42 @@ #include "hgFind.h" #include "obscure.h" #include "net.h" boolean extToolsEnabled() /* Return TRUE if we can display the external tools menu. */ { return fileExists("extTools.ra"); } void printExtMenuData(char *chromName) /* print the external tools aka "send to" menu entries as a javascript list to stdout */ { if (!extToolsEnabled()) return; -struct extTool *extTools = readExtToolRa("extTools.ra"); + +struct extTool *extTools = NULL; + +// we allow an alternative location in /gbdb/hgFixed +// This means that we do not have to do a build patch when +// we have to change this .ra file and can do it with a simple +// file push to the RR +if (fileExists("/gbdb/hgFixed/extTools.ra")) + extTools = readExtToolRa("/gbdb/hgFixed/extTools.ra"); +else + extTools = readExtToolRa("extTools.ra"); + struct extTool *et; struct dyString *dy = dyStringNew(1024); dyStringAppend(dy, "extTools = [\n"); for(et = extTools; et != NULL; et = et->next) { // special case for alternate chroms on hg38, skip the Ensembl links if (chromName!=NULL && startsWith("ensembl", et->tool) && endsWith(chromName, "_alt")) continue; if (et->dbs!=NULL) { if (!slNameInList(et->dbs, database)) continue; } if (et->notDbs!=NULL)