src/hg/utils/automation/fileServer 1.1

1.1 2009/04/16 04:11:35 hiram
This source found in /cluster/bin/scripts appears to not be in the source tree yet and it is used by the blastz pipeline
Index: src/hg/utils/automation/fileServer
===================================================================
RCS file: src/hg/utils/automation/fileServer
diff -N src/hg/utils/automation/fileServer
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/hg/utils/automation/fileServer	16 Apr 2009 04:11:35 -0000	1.1
@@ -0,0 +1,18 @@
+#!/bin/csh -ef
+
+# fileServer - determine fileserver for given dir/file (or . by default)
+# For use in making assemblies
+
+if ("$1" != "") then
+  set dir = $1
+else
+  set dir = .
+endif
+if (! -e $dir) then
+  echo "$dir doesn't exist"
+  exit 1
+endif
+set fs = `df $dir | sed -n 2p | sed -e 's/\/.*//; s/:.*//; s/-10$//;'`
+if ("$fs" == "") set fs = $HOST
+echo $fs
+