Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update scripts to use new LibDirs module

  • Loading branch information...
commit 2058a7d762794494c8041ac1e04840d2ded0f139 1 parent 500e66f
@nicklangridge nicklangridge authored
View
10 utils/check_atlas_species.pl
@@ -19,13 +19,7 @@
use Data::Dumper;
use DBI;
use Net::FTP;
-
-BEGIN {
- unshift @INC, "$Bin/../../../conf";
- unshift @INC, "$Bin/../../../";
- require SiteDefs;
- unshift @INC, $_ for @SiteDefs::ENSEMBL_LIB_DIRS;
-}
+use LibDirs;
use LoadPlugins;
use EnsEMBL::Web::SpeciesDefs;
@@ -53,7 +47,7 @@ BEGIN
(my $plugin = lc($SiteDefs::ENSEMBL_SITETYPE)) =~ s/^ensembl\s*//;
# crude check to see which ini files already have pride configured
-my $grep = `grep "S4_EXPRESSION\\s*=\\s*1" $Bin/../../$plugin/conf/ini-files/*`;
+my $grep = `grep "S4_EXPRESSION\\s*=\\s*1" $Bin/../../eg-web-$plugin/conf/ini-files/*`;
print "\nIt looks like Expression Atlas is already configured in these ini files:\n";
print "$grep\n";
View
10 utils/check_pride_species.pl
@@ -25,20 +25,14 @@
my $REGISTRY_URL = 'http://www.ebi.ac.uk/pride/biomart/martservice?type=registry';
-BEGIN {
- unshift @INC, "$Bin/../../../conf";
- unshift @INC, "$Bin/../../../";
- require SiteDefs;
- unshift @INC, $_ for @SiteDefs::ENSEMBL_LIB_DIRS;
-}
-
+use LibDirs;
use LoadPlugins;
use EnsEMBL::Web::SpeciesDefs;
my $species_defs = EnsEMBL::Web::SpeciesDefs->new;
# crude check to see which ini files in this plugin already have pride configured
(my $plugin = lc($SiteDefs::ENSEMBL_SITETYPE)) =~ s/^ensembl\s*//;
-my $grep = `grep "DS_1436\\s*=" $Bin/../../$plugin/conf/ini-files/*`;
+my $grep = `grep "DS_1436\\s*=" $Bin/../../eg-web-$plugin/conf/ini-files/*`;
my %site_tax = map {$species_defs->get_config($_, 'TAXONOMY_ID') => $_} $species_defs->valid_species;
View
2  utils/compress_web_assets.pl
@@ -28,7 +28,7 @@
"v" => \$verbose,
) || die "Invalid options\n";
-die "Please specify the plugin dir (example: --plugin_dir=eg-plugins/fungi)\n" if !$plugin_dir;
+die "Please specify the plugin dir (example: --plugin_dir=eg-web-fungi)\n" if !$plugin_dir;
die "Plugin dir does not exist\n" if !-e $plugin_dir;
$plugin_dir =~ s/\/$//; # strip trailing slash
View
9 utils/make_docsearch_index.pl
@@ -20,14 +20,7 @@
use File::Find;
use Lucy::Simple;
use File::Path qw(make_path remove_tree);
-#use File::Copy qw(move);
-
-BEGIN {
- unshift @INC, "$Bin/../../../conf";
- unshift @INC, "$Bin/../../../";
- require SiteDefs;
- unshift @INC, $_ for @SiteDefs::ENSEMBL_LIB_DIRS;
-}
+use LibDirs;
my $index_dir = $SiteDefs::DOCSEARCH_INDEX_DIR || die '$SiteDefs::DOCSEARCH_INDEX_DIR is not set';
View
14 utils/meta_sample_healthch.pl 100644 → 100755
@@ -31,19 +31,7 @@ package example_links_healthcheck;
use Config::Tiny;
use File::Basename;
use Time::Local;
-
-# Load libraries needed for reading config -----------------------------------
-use vars qw( $SERVERROOT );
-
-BEGIN {
- my $dirname = dirname("$Bin");
- $SERVERROOT = "$dirname/../../";
- unshift @INC, "$SERVERROOT/conf";
- unshift @INC, "$SERVERROOT";
- eval { require SiteDefs };
- if ($@) { die "Can't use SiteDefs.pm - $@\n"; }
- map { unshift @INC, $_ } @SiteDefs::ENSEMBL_LIB_DIRS;
-}
+use LibDirs;
use Bio::EnsEMBL::DBLoader;
use EnsEMBL::Web::DBSQL::DBConnection;
View
11 utils/search_dump_extra.pl
@@ -15,19 +15,12 @@
use strict;
use warnings;
-use FindBin qw($Bin);
use Getopt::Long;
use XML::Generator;
use Data::Dumper;
use HTML::Entities;
-
-BEGIN {
- unshift @INC, "$Bin/../../conf";
- unshift @INC, "$Bin/../../";
- require SiteDefs;
- unshift @INC, $_ for @SiteDefs::ENSEMBL_LIB_DIRS;
- require EnsEMBL::Web::Hub;
-}
+use LibDirs;
+use EnsEMBL::Web::Hub;
my $dir = '.';
my $index_list;
View
17 utils/update_website_db.pl 100644 → 100755
@@ -19,20 +19,9 @@
use File::Basename qw(dirname);
use FindBin qw($Bin);
use Data::Dumper;
-
-# Comment; this script will create a copy of the help link for every ontology graph in EG
-
-BEGIN {
- my $serverroot = dirname($Bin) . "/../../";
- unshift @INC, "$serverroot/conf", $serverroot;
-
- require SiteDefs;
-
- unshift @INC, $_ for @SiteDefs::ENSEMBL_LIB_DIRS;
-
- require EnsEMBL::Web::DBSQL::WebsiteAdaptor;
- require EnsEMBL::Web::Hub;
-}
+use LibDirs;
+use EnsEMBL::Web::DBSQL::WebsiteAdaptor;
+use EnsEMBL::Web::Hub;
my $hub = new EnsEMBL::Web::Hub;
my $dbh = new EnsEMBL::Web::DBSQL::WebsiteAdaptor($hub)->db;
Please sign in to comment.
Something went wrong with that request. Please try again.