aboutsummaryrefslogtreecommitdiff
path: root/unix/hlib
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 22:48:30 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 22:48:30 -0400
commit0d2847460f84452c4a7676a9ebe638be81b3324f (patch)
treec3fddcf8af0345c4b006c0f92bacc98360fa5eee /unix/hlib
parent1c5da1d8c1f89dd2b6a615b3fc448bde0ca90ed2 (diff)
downloadiraf-linux-0d2847460f84452c4a7676a9ebe638be81b3324f.tar.gz
fakehome galore
Diffstat (limited to 'unix/hlib')
-rwxr-xr-xunix/hlib/irafuser.csh13
-rwxr-xr-xunix/hlib/irafuser.sh11
-rwxr-xr-xunix/hlib/mkiraf.sh31
3 files changed, 31 insertions, 24 deletions
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