-
Notifications
You must be signed in to change notification settings - Fork 0
/
idluserdir_setup
50 lines (43 loc) · 1.36 KB
/
idluserdir_setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/csh -f -x
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# This file is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
if ${?EPICS_EXTENSIONS} == 0 then
set EPICS_EXTENSIONS = `/usr/local/epics/extensions`
endif
set PVT_LOC = $EPICS_EXTENSIONS/bin/$EPICS_HOST_ARCH
if ${?EPICS_EXTENSIONS_PVT} == 1 then
set PVT_LOC = $EPICS_EXTENSIONS_PVT/bin/$EPICS_HOST_ARCH
endif
setenv IDL_DEVICE X
# source /usr/local/rsi/idl_5.3/bin/idl_setup
setenv IDL_STARTUP $PVT_LOC/../../idllib/viewer_startup.pro
#
# set default IDL_USERDIR
#
set dir=`pwd`
echo "PWD" $dir
if (-w $dir) == 1 then
set IDL_USERDIR=$dir
setenv IDL_USERDIR $IDL_USERDIR
echo IDL_USERDIR $IDL_USERDIR
exit
endif
if ${?IDL_USERDIR} == 0 then
set IDL_USERDIR=$HOME/idl
if -e $IDL_USERDIR then
if (-d $IDL_USERDIR )== 0 then
set IDL_USERDIR=$HOME
endif
else
mkdir ${IDL_USERDIR}
endif
endif
setenv IDL_USERDIR $IDL_USERDIR
echo IDL_USERDIR $IDL_USERDIR
cd $IDL_USERDIR