During task setup, if it exists, run /crunch_scripts/install instead
authorTom Clegg <tom@clinicalfuture.com>
Tue, 17 Sep 2013 01:59:04 +0000 (21:59 -0400)
committerTom Clegg <tom@clinicalfuture.com>
Tue, 17 Sep 2013 01:59:21 +0000 (21:59 -0400)
of /install.sh

services/crunch/crunch-job

index 2dcd0f03d5419dfb04382a39bfec56932a54e753..10acb8cbbe72ee99a539e49ebd0dfe168405c924 100755 (executable)
@@ -1330,7 +1330,9 @@ my $pwd;
 chomp ($pwd = `pwd`);
 my $install_dir = $ENV{"CRUNCH_INSTALL"} || "$pwd/opt";
 mkdir $install_dir;
-if (!-e "./install.sh" && -e "./tests/autotests.sh") {
+if (-e "$destdir/crunch_scripts/install") {
+    shell_or_die ("$destdir/crunch_scripts/install", $install_dir);
+} elsif (!-e "./install.sh" && -e "./tests/autotests.sh") {
     # Old version
     shell_or_die ("./tests/autotests.sh", $install_dir);
 } elsif (-e "./install.sh") {