Repository 'dos2unix'
hg clone https://toolshed.g2.bx.psu.edu/repos/sarahinraauzeville/dos2unix

Changeset 4:71f57a90f530 (2017-12-12)
Previous changeset 3:bcc062005bb2 (2017-12-12) Next changeset 5:de565501c7d3 (2017-12-12)
Commit message:
Uploaded
added:
GalaxyPath.pm
b
diff -r bcc062005bb2 -r 71f57a90f530 GalaxyPath.pm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/GalaxyPath.pm Tue Dec 12 09:40:37 2017 -0500
b
@@ -0,0 +1,19 @@
+package GalaxyPath;
+
+use parent 'Config::IniFiles';
+
+sub _convert_path{
+ my ($path)=@_;
+ return $path if ($path=~/^\//);
+ return "$ENV{'MY_GALAXY_DIR'}/galaxy/$path";
+}
+
+sub my_path{
+    my $self = shift;
+    my ($section,$item)=@_;
+    defined $ENV{'MY_GALAXY_DIR'} || die 'no MY_GALAXY_DIR environment variable defined';
+    -e $ENV{'MY_GALAXY_DIR'} || die "$ENV{'MY_GALAXY_DIR'} path not found";
+    return join(',',map{_convert_path($_)}split/,/,$self->val($section,$item));
+}

+1;