aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall4
-rwxr-xr-xunix/hlib/irafuser.csh13
-rwxr-xr-xunix/hlib/irafuser.sh11
-rwxr-xr-xunix/hlib/mkiraf.sh31
4 files changed, 34 insertions, 25 deletions
diff --git a/install b/install
index 815143f8..09fa0188 100755
--- a/install
+++ b/install
@@ -98,6 +98,7 @@ p_cache="" # <param> cache directory
o_iraf="" # old iraf root directory
o_imdir="" # old image directory
o_cache="" # old cache directory
+o_fakehome="" # old fakehome directory?
@@ -202,7 +203,8 @@ while [ -n "$1" ] ; do
;;
"-f"|"-fakehome"|"--fakehome") # set the non-home directory
- o_fakehome=$2; shift
+ o_fakehome=$2; shift
+ export FAKEHOME=$o_fakehome
;;
"-C"|"-oldcache"|"--oldcache") # set old cache directory
o_cache=$2 ; shift
diff --git a/unix/hlib/irafuser.csh b/unix/hlib/irafuser.csh
index 4ae5bb93..b150100d 100755
--- a/unix/hlib/irafuser.csh
+++ b/unix/hlib/irafuser.csh
@@ -62,7 +62,6 @@ else # old_method
endif # old_method
-
setenv hostid unix
setenv host ${iraf}unix/
setenv hlib ${iraf}unix/hlib/
@@ -181,11 +180,13 @@ endsw
# Prepend a user <iraf.h> file to the compile flags in case we don't
# install as root.
#
-setenv HSI_CF "-I${HOME}/.iraf/ $HSI_CF"
-setenv HSI_FF "-I${HOME}/.iraf/ $HSI_FF"
-setenv HSI_LF "-I${HOME}/.iraf/ $HSI_LF"
-setenv HSI_XF "-I${HOME}/.iraf/ $HSI_XF"
-setenv XC_CFLAGS "-I${HOME}/.iraf/"
+set FAKEHOME="$iraf/fakehome"
+setenv HSI_CF "-I${FAKEHOME}/.iraf/ $HSI_CF"
+setenv HSI_FF "-I${FAKEHOME}/.iraf/ $HSI_FF"
+setenv HSI_LF "-I${FAKEHOME}/.iraf/ $HSI_LF"
+setenv HSI_XF "-I${FAKEHOME}/.iraf/ $HSI_XF"
+setenv XC_CFLAGS "-I${FAKEHOME}/.iraf/"
+unset FAKEHOME
# The following determines whether or not the VOS is used for filename mapping.
diff --git a/unix/hlib/irafuser.sh b/unix/hlib/irafuser.sh
index d71828d8..815b1ee9 100755
--- a/unix/hlib/irafuser.sh
+++ b/unix/hlib/irafuser.sh
@@ -126,11 +126,12 @@ esac
# Prepend a user <iraf.h> file to the compile flags in case we don't
# install as root.
#
-export HSI_CF="-I${HOME}/.iraf/ $HSI_CF"
-export HSI_FF="-I${HOME}/.iraf/ $HSI_FF"
-export HSI_LF="-I${HOME}/.iraf/ $HSI_LF"
-export HSI_XF="-I${HOME}/.iraf/ $HSI_XF"
-
+FAKEHOME=$iraf/fakehome
+export HSI_CF="-I${FAKEHOME}/.iraf/ $HSI_CF"
+export HSI_FF="-I${FAKEHOME}/.iraf/ $HSI_FF"
+export HSI_LF="-I${FAKEHOME}/.iraf/ $HSI_LF"
+export HSI_XF="-I${FAKEHOME}/.iraf/ $HSI_XF"
+unset FAKEHOME
# The following determines whether or not the VOS is used for filename mapping.
if [ -f ${iraf}lib/libsys.a ]; then
diff --git a/unix/hlib/mkiraf.sh b/unix/hlib/mkiraf.sh
index e62072ce..ff2a1630 100755
--- a/unix/hlib/mkiraf.sh
+++ b/unix/hlib/mkiraf.sh
@@ -22,13 +22,15 @@ myterm="none"
uparm_init=-1
quiet=0
def=0
+force=0
defterm="xgterm"
# Paths edited by the install script.
-iraf="/iraf/iraf/"
-imdir="/iraf/imdir/"
-cachedir="/iraf/cache/"
-
+iraf="/srv/conda/sources/iraf/"
+imdir="/srv/conda/sources/iraf/fakehome/imdir//"
+cachedir="/srv/conda/sources/iraf/fakehome/cache//"
+# Bad hack - jhunk
+FAKEHOME=$(dirname $imdir)
# ------------- (end of site dependent definitions) ------------------------
@@ -59,6 +61,9 @@ do
-q|--quiet) # Suppress output
quiet=1
;;
+ -f|--force) # Install in $iraf regardless
+ force=1
+ ;;
*)
/bin/echo "Error: unknown option '$i'"
exit 1
@@ -70,22 +75,22 @@ done
# Protect against running mkiraf in an iraf system directory.
irafdir=`cd $iraf ; pwd`
-if [ ! "`pwd | grep $irafdir`" = "" ]; then
- if [ "`pwd | grep iraf/local`" = "" ]; then
- /bin/echo "Error: current directory is not an iraf user login directory"
- exit 1
+if (( $force==0 )); then
+ if [ ! "`pwd | grep $irafdir`" = "" ]; then
+ if [ "`pwd | grep iraf/local`" = "" ]; then
+ /bin/echo "Error: current directory is not an iraf user login directory"
+ exit 1
+ fi
fi
fi
if (( $def == 1 )); then
- imdir=`echo $HOME`"/.iraf/imdir/"
- cachedir=`echo $HOME`"/.iraf/cache/"
#myterm="xgterm"
- cd $HOME
+ cd $FAKEHOME
if [ ! -e .iraf ]; then
- mkdir $HOME/.iraf
+ mkdir $FAKEHOME/.iraf
fi
- cd $HOME/.iraf
+ cd $FAKEHOME/.iraf
if [ ! -e bin ]; then
mkdir bin
fi