From 5286c8aa4a8d381047527c4fe03e9ba12aadf607 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 25 Oct 2012 00:20:21 -0400 Subject: [PATCH] added a c-shell setpath script variant --- setpath.csh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 setpath.csh diff --git a/setpath.csh b/setpath.csh new file mode 100755 index 00000000..85294649 --- /dev/null +++ b/setpath.csh @@ -0,0 +1,27 @@ +#!/bin/tcsh + +set called=($_) +if ("$called" != "") then + set reldir=`dirname $called[2]` +else if ("$0" != "tcsh") then + set reldir=`dirname 0` +else + echo "Unable to detect path!" + exit 1 +endif +set MITSUBA_DIR=`cd $reldir && pwd` + +if ("$0" == "Darwin") then + setenv PATH "$MITSUBA_DIR/Mitsuba.app/Contents/MacOS:$PATH" +else + if (! ($?LD_LIBRARY_PATH) ) then + setenv LD_LIBRARY_PATH "$MITSUBA_DIR/dist" + else + setenv LD_LIBRARY_PATH "$MITSUBA_DIR/dist:$LD_LIBRARY_PATH" + endif + setenv PATH "$MITSUBA_DIR/dist:$PATH" + # Generate core dumps if something goes wrong + limit coredumpsize 1000000000 +endif + +unset reldir