summaryrefslogtreecommitdiffstats
path: root/source/d/icecream/icecream.csh
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/icecream/icecream.csh')
-rw-r--r--source/d/icecream/icecream.csh19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/d/icecream/icecream.csh b/source/d/icecream/icecream.csh
new file mode 100644
index 000000000..6c558d615
--- /dev/null
+++ b/source/d/icecream/icecream.csh
@@ -0,0 +1,19 @@
+#!/bin/csh
+# Only add the icecream directory to the PATH if we see that icecc-scheduler
+# and/or iceccd are running on this machine:
+
+setenv ICECC_PRESENT false
+/usr/bin/pgrep --ns $$ -f "^/usr/sbin/icecc-scheduler" > /dev/null
+if ( $? == 0 ) then
+ setenv ICECC_PRESENT true
+endif
+
+/usr/bin/pgrep --ns $$ -f "^/usr/sbin/iceccd" > /dev/null
+if ( $? == 0 ) then
+ setenv ICECC_PRESENT true
+endif
+
+if ( $ICECC_PRESENT == true ) then
+ setenv PATH /usr/libexec/icecc/bin:${PATH}
+endif
+