diff --git a/install b/install index c175004..fab7ecb 100755 --- a/install +++ b/install @@ -17,6 +17,7 @@ # -v, --verbose # verbose output # -s, --system # do a system install (needs root) # -C, --csh # install C-shell scripts +# -D, --accept-defaults # accept all defaults # # -t, --term # set default terminal type # -b, --bindir # set local bin directory @@ -24,6 +25,7 @@ # -i, --imdir # set image directory # -m, --mach # set architecture # -r, --root # set iraf root directory +# -f, --fakehome # set the non-home directory (think /home/user/.iraf) # # -C, --oldcache # set old cache directory # -I, --oldimdir # set old image directory @@ -79,6 +81,7 @@ err_count=0 # error count exec="yes" # take action? old_links=0 # use old link method? extn="sh" # shell script extension +accept_defaults=0 LS="/bin/ls" # directory listing command W='\([ "]\)' # match a blank, tab, or quote @@ -95,6 +98,7 @@ p_cache="" # cache directory o_iraf="" # old iraf root directory o_imdir="" # old image directory o_cache="" # old cache directory +o_fakehome="" # old fakehome directory? @@ -115,6 +119,7 @@ install_help() { ECHO " -v, --verbose # verbose output" ECHO " -s, --system # do a system install (needs root)" ECHO " -C, --csh # install C-shell scripts" + ECHO " -d, --accept-defaults # accept all defaults" ECHO "" ECHO " -t, --term # set default terminal type" ECHO " -b, --bindir # set local bin directory" @@ -122,6 +127,7 @@ install_help() { ECHO " -i, --imdir # set image directory" ECHO " -m, --mach # set architecture" ECHO " -r, --root # set iraf root directory" + ECHO " -f, --fakehome # set the non-home directory (think /home/user/.iraf)" ECHO "" ECHO " -C, --oldcache # set old cache directory" ECHO " -I, --oldimdir # set old image directory" @@ -165,7 +171,9 @@ while [ -n "$1" ] ; do "-C"|"-csh"|"--csh") # install C-shell scripts extn="csh" ;; - + "-D"|"-accept-defaults"|"--accept-defaults") # accept all defaults + accept_defaults=1 + ;; "-t"|"-term"|"--term") # set default terminal type. defterm=$2 ; shift ;; @@ -194,6 +202,10 @@ while [ -n "$1" ] ; do fi ;; + "-f"|"-fakehome"|"--fakehome") # set the non-home directory + o_fakehome=$2; shift + export FAKEHOME=$o_fakehome + ;; "-C"|"-oldcache"|"--oldcache") # set old cache directory o_cache=$2 ; shift ;; @@ -244,12 +256,15 @@ if [ "$o_cache" == "" ]; then fi o_cache=`echo $o_cache | sed -e 's+/\(["]*\)$+\1+'` - +#if [ "$o_fakehome" == "" ]; then +# o_fakehome=`grep "^fakehome=" $mkiraf | sed -e "s+fakehome=++" -e 's+"++g'` +#fi +#o_fakehome=`echo $o_fakehome| sed -e 's+/\(["]*\)$+\1+'` #============================================================================= # User Check # -# If we're doing a private install, initialize the $HOME/.iraf directory. +# If we're doing a private install, initialize the ${FAKEHOME} directory. #============================================================================= # Get the current user name. @@ -268,7 +283,10 @@ if [ "$WHOAMI" == "root" ]; then BOLD_ON ECHO "You are running as the root user: " PROMPT "Install IRAF for all users on this machine?" - read ans + + if (( $accept_defaults==0 )); then + read ans + fi do_proceed="no" if [ -n $ans ]; then @@ -307,15 +325,15 @@ if [ "$WHOAMI" == "root" ]; then fi if (( $do_system==0 )); then - if [ ! -e "$HOME/.iraf" ]; then + if [ ! -e "${FAKEHOME}" ]; then NEWLINE - ECHO "Initializing $HOME/.iraf directory ....." + ECHO "Initializing ${FAKEHOME} directory ....." NEWLINE - mkdir $HOME/.iraf - (cd $HOME/.iraf ; mkdir imdir cache bin) + mkdir ${FAKEHOME} + (cd ${FAKEHOME} ; mkdir imdir cache bin) fi - bindir="$HOME/.iraf/bin" + bindir="${FAKEHOME}/bin" fi @@ -421,7 +439,10 @@ while [ $iraf_prompt == "yes" ]; do NEWLINE BOLD_ON ; ECHO -n "New iraf root directory " ; BOLD_OFF ECHO -n "($d_iraf): " - read iraf + + if (( $accept_defaults==0 )); then + read iraf + fi if [ "$iraf" == "" ]; then export iraf="$d_iraf" @@ -462,7 +483,7 @@ done if [ "$imdir" == "" ]; then if (( $do_system==0 )); then - d_imdir="$HOME/.iraf/imdir/" + d_imdir="${FAKEHOME}/imdir/" elif [ -d "$o_imdir" ]; then d_imdir=$o_imdir elif [ -d "/iraf" ]; then @@ -483,8 +504,10 @@ if [ "$imdir" == "" ]; then imdir_prompt="no" BOLD_ON ; ECHO -n "Default root image storage directory " ; BOLD_OFF ECHO -n "($d_imdir): " - read imdir + if (( $accept_defaults==0 )); then + read imdir + fi if [ "$imdir" == "" ]; then imdir="$d_imdir" imdir_prompt="no" @@ -528,7 +551,7 @@ fi if [ "$cache" == "" ]; then if (( $do_system==0 )); then - d_cache="$HOME/.iraf/cache/" + d_cache="${FAKEHOME}/cache/" elif [ -d "/iraf" ]; then d_cache="/iraf/cache" elif [ -d "/home/iraf" ]; then @@ -547,7 +570,9 @@ if [ "$cache" == "" ]; then cache_prompt="no" BOLD_ON ; ECHO -n "Default root cache directory " ; BOLD_OFF ECHO -n "($d_cache): " - read cache + if (( $accept_defaults==0 )); then + read cache + fi if [ "$cache" == "" ]; then cache="$d_cache" cache_prompt="no" @@ -592,7 +617,7 @@ fi if [ "$lbin" == "" ]; then # Look around and come up with a likely candidate directory. if (( $do_system==0 )); then - d_lbin="$HOME/.iraf/bin/" + d_lbin="${FAKEHOME}/bin/" elif [ -d "/usr/local/bin" ]; then d_lbin="/usr/local/bin" elif [ -d "/opt/local/bin" ]; then @@ -609,7 +634,10 @@ if [ "$lbin" == "" ]; then lbin_prompt="no" BOLD_ON ; ECHO -n "Local unix commands directory " ; BOLD_OFF ECHO -n "($d_lbin): " - read lbin + + if (( $accept_defaults==0 )); then + read lbin + fi if [ "$lbin" == "" ]; then lbin="$d_lbin" lbin_prompt="no" @@ -635,7 +663,9 @@ if [ "$lbin" == "" ]; then BOLD_ON ; ECHO -n " Sorry, but $lbin does not exist, create it? " BOLD_OFF - read ans + if (( $accept_defaults==0 )); then + read ans + fi fi if [ "$ans" == "" -o "$ans" == "y" -o "$ans" == "yes" ]; then ECHO " Creating directory $lbin..." @@ -670,7 +700,9 @@ if (( $do_system==0 )); then ECHO -n '): ' BOLD_OFF - read myterm + if (( $accept_defaults==0 )); then + read myterm + fi if [ -z "$myterm" ]; then myterm=$defterm fi @@ -803,7 +835,9 @@ NEWLINE ; NEWLINE do_proceed="yes" while [ "$do_proceed" == "yes" ]; do PROMPT "Proceed with installation? " - read ans + if (( $accept_defaults==0 )); then + read ans + fi do_proceed="no" if [ "$ans" == "" -o "$ans" == "y" -o "$ans" == "yes" ]; then @@ -903,7 +937,9 @@ if (( $cl_found==1 )); then del_cmd_="yes" while [ "$del_cmd_" == "yes" ]; do PROMPT "Do you want to delete commands in the old directory? " - read ans + if (( $accept_defaults==0 )); then + read ans + fi del_cmd_="no" if [ -n $ans ]; then @@ -979,43 +1015,48 @@ ECHO " Editing Paths" ECHO " -------------" BOLD_OFF -# Edit the $iraf pathname in the .login file for user 'iraf'. -if (( $do_system==0 )); then - ECHO -n "Editing the iraf user .login/.cshrc paths ... " - pfiles=("$iraf/local/.cshrc $iraf/local/.login") -else - ECHO -n "Editing the user .login/.cshrc paths ... " - if [ "$SHELL" == "/bin/sh" ]; then - pfiles=("$HOME/.bashrc $HOME/.profile $HOME/.bash_profile $HOME/.bash_login") - else - pfiles=("$HOME/.cshrc $HOME/.login") - fi -fi -for file in ${pfiles[@]}; do - if [ -e "$file" ]; then - if [ "$exec" == "yes" ]; then - RM $TEMP >& /dev/null - sed -e "s+$o_iraf+$iraf+" $file > $TEMP - cmp -s $file $TEMP - if (( $?==1 )); then - PUT $TEMP $file - fi - RM $TEMP >& /dev/null - fi - else - if (( "$err_seen"=0 )); then - DO_FAIL - err_seen=1 - err_count=$(( err_count+1 )) - fi - MSG "Cannot find the iraf $file file" - RM $TEMP >& /dev/null - fi -done +echo "Editing the user login paths... WILL NOT COMPLY..." if (( "$err_seen"==0 )); then DO_OK fi +# Edit the $iraf pathname in the .login file for user 'iraf'. +#if (( $do_system==0 )); then +# ECHO -n "Editing the iraf user .login/.cshrc paths ... " +# pfiles=("$iraf/local/.cshrc $iraf/local/.login") +#else +# ECHO -n "Editing the user .login/.cshrc paths ... " +# if [ "$SHELL" == "/bin/sh" ]; then +# pfiles=("$FAKEHOME/.bashrc $FAKEHOME/.profile $FAKEHOME/.bash_profile $FAKEHOME/.bash_login") +# else +# pfiles=("$FAKEHOME/.cshrc $FAKEHOME/.login") +# fi +#fi +#for file in ${pfiles[@]}; do +# if [ -e "$file" ]; then +# if [ "$exec" == "yes" ]; then +# RM $TEMP >& /dev/null +# sed -e "s+$o_iraf+$iraf+" $file > $TEMP +# cmp -s $file $TEMP +# if (( $?==1 )); then +# PUT $TEMP $file +# fi +# RM $TEMP >& /dev/null +# fi +# else +# if (( "$err_seen"=0 )); then +# DO_FAIL +# err_seen=1 +# err_count=$(( err_count+1 )) +# fi +# MSG "Cannot find the iraf $file file" +# RM $TEMP >& /dev/null +# fi +#done +#if (( "$err_seen"==0 )); then +# DO_OK +#fi + # Edit the $iraf and $imdir paths in mkiraf.*sh, *cl.*sh, and libc/iraf.h # files. @@ -1121,7 +1162,7 @@ fi if (( "do_system"==1 )); then ECHO -n "Creating root imdir at $imdir ... " else - ECHO -n 'Creating root imdir at $HOME/.iraf/imdir ... ' + ECHO -n 'Creating root imdir at ${FAKEHOME}/imdir ... ' ECHO -n ' ' fi if [ "$exec" == "yes" ]; then @@ -1150,7 +1191,7 @@ fi if (( "do_system"==1 )); then ECHO -n "Creating root cache at $cache ... " else - ECHO -n 'Creating root cache at $HOME/.iraf/cach ... ' + ECHO -n 'Creating root cache at ${FAKEHOME}/cach ... ' ECHO -n ' ' fi if [ "$exec" == "yes" ]; then @@ -1252,7 +1293,7 @@ if (( "$do_system"==1 )); then else # else of 'do_system' ECHO -n "Creating symlink ... " - file1="$HOME/.iraf/iraf.h" + file1="${FAKEHOME}/iraf.h" file2="$iraf/unix/hlib/libc/iraf.h" err_seen=0 @@ -1280,10 +1321,10 @@ else # else of 'do_system' ECHO -n 'Marking system architecture ... ' if [ "$exec" == "yes" ]; then - if [ -e "$HOME/.iraf/arch" ]; then - RM $HOME/.iraf/arch + if [ -e "${FAKEHOME}/arch" ]; then + RM ${FAKEHOME}/arch fi - echo $IRAFARCH > $HOME/.iraf/arch + echo $IRAFARCH > ${FAKEHOME}/arch fi DO_OK @@ -1491,8 +1532,8 @@ if (( "$do_system"==1 )); then file1=/usr/local/lib/imtoolrc ECHO -n "Creating /usr/local/lib/imtoolrc link ... " else - file1=$HOME/.imtoolrc - ECHO -n 'Creating $HOME/.imtoolrc link ... ' + file1=$FAKEHOME/.imtoolrc + ECHO -n 'Creating $FAKEHOME/.imtoolrc link ... ' fi RM -f $file1 file2=$iraf/dev/imtoolrc @@ -1534,10 +1575,10 @@ if (( "$do_system"==0 )); then for f in ${xfiles[@]}; do if [ -e "$iraf/vendor/x11iraf/bin.$IRAFARCH/$f" ]; then if [ "$exec" == "yes" ]; then - if [ -e "$HOME/.iraf/bin/$f" ]; then - RM $HOME/.iraf/bin/$f + if [ -e "${FAKEHOME}/bin/$f" ]; then + RM ${FAKEHOME}/bin/$f fi - ln -s $iraf/vendor/x11iraf/bin.$IRAFARCH/$f $HOME/.iraf/bin/$f + ln -s $iraf/vendor/x11iraf/bin.$IRAFARCH/$f ${FAKEHOME}/bin/$f fi fi done @@ -1557,13 +1598,13 @@ if [ "$do_system" == 0 ]; then BOLD_OFF cur=$PWD - if [ ! -e $HOME/.iraf ]; then - mkdir $HOME/.iraf + if [ ! -e ${FAKEHOME} ]; then + mkdir ${FAKEHOME} fi - cd $HOME/.iraf + cd ${FAKEHOME} ECHO -n "Creating global login.cl and uparm directory .... " $iraf/unix/hlib/mkiraf.sh --default --init --term=$myterm >& /dev/null - if [ -e "$HOME/.iraf/login.cl" ]; then + if [ -e "${FAKEHOME}/login.cl" ]; then DO_OK else DO_FAIL @@ -1572,8 +1613,8 @@ if [ "$do_system" == 0 ]; then cd $cur # Add the setup to the user's login files. - cfiles=("$HOME/.cshrc $HOME/.tcshrc $HOME/.login") - bfiles=("$HOME/.bashrc $HOME/.profile $HOME/.bash_profile $HOME/.bash_login") + cfiles=("$FAKEHOME/.cshrc $FAKEHOME/.tcshrc $FAKEHOME/.login") + bfiles=("$FAKEHOME/.bashrc $FAKEHOME/.profile $FAKEHOME/.bash_profile $FAKEHOME/.bash_login") for file in ${cfiles[@]}; do if [ -e "$file" ]; then @@ -1585,8 +1626,8 @@ if [ "$do_system" == 0 ]; then if (( $?==1 )); then echo "" >> $TEMP echo "# Add iraf setup commands" >> $TEMP - echo "if ( -e $HOME/.iraf/setup.csh ) then" >> $TEMP - echo " source $HOME/.iraf/setup.csh" >> $TEMP + echo "if ( -e ${FAKEHOME}/setup.csh ) then" >> $TEMP + echo " source ${FAKEHOME}/setup.csh" >> $TEMP echo "endif" >> $TEMP cp $file ${file}.bak PUT $TEMP $file @@ -1597,8 +1638,8 @@ if [ "$do_system" == 0 ]; then RM -f $TEMP >& /dev/null echo "" > $file echo "# Add iraf setup commands" >> $file - echo "if ( -e $HOME/.iraf/setup.csh ) then" >> $file - echo " source $HOME/.iraf/setup.csh" >> $file + echo "if ( -e ${FAKEHOME}/setup.csh ) then" >> $file + echo " source ${FAKEHOME}/setup.csh" >> $file echo "endif" >> $file fi done @@ -1613,8 +1654,8 @@ if [ "$do_system" == 0 ]; then if (( $?==1 )); then echo "" >> $TEMP echo "# Add iraf setup commands" >> $TEMP - echo "if [ -e $HOME/.iraf/setup.sh ]; then" >> $TEMP - echo " source $HOME/.iraf/setup.sh" >> $TEMP + echo "if [ -e ${FAKEHOME}/setup.sh ]; then" >> $TEMP + echo " source ${FAKEHOME}/setup.sh" >> $TEMP echo "fi" >> $TEMP cp $file ${file}.bak PUT $TEMP $file @@ -1625,8 +1666,8 @@ if [ "$do_system" == 0 ]; then RM -f $TEMP >& /dev/null echo "" > $file echo "# Add iraf setup commands" >> $file - echo "if [ -e $HOME/.iraf/setup.sh ]; then" >> $file - echo " source $HOME/.iraf/setup.sh" >> $file + echo "if [ -e ${FAKEHOME}/setup.sh ]; then" >> $file + echo " source ${FAKEHOME}/setup.sh" >> $file echo "fi" >> $file fi done @@ -1678,7 +1719,7 @@ if (( "$err_count"==0 )); then BOLD_ON; ECHO 'cl '; BOLD_OFF ECHO "" ECHO "From any directory to use the global login files created in the" - BOLD_ON ; ECHO -n "$HOME/.iraf " ; BOLD_OFF + BOLD_ON ; ECHO -n "${FAKEHOME} " ; BOLD_OFF ECHO "directory. If you wish to have a login.cl/uparm that" ECHO "is specific to a particular directory, you will need to type" ECHO "" diff --git a/unix/hlib/irafuser.csh b/unix/hlib/irafuser.csh index 4ae5bb9..b150100 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 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 d71828d..a4d036c 100755 --- a/unix/hlib/irafuser.sh +++ b/unix/hlib/irafuser.sh @@ -126,11 +126,12 @@ esac # Prepend a user 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 @@ -142,8 +143,8 @@ fi export HSI_LIBS="$HSI_LIBS $HSI_OSLIBS" -alias mkiraf=${hlib}mkiraf.csh -alias mkmlist=${hlib}mkmlist.csh +alias mkiraf=${hlib}mkiraf.sh +alias mkmlist=${hlib}mkmlist.sh #alias mkz=${hbin}mkpkg.e "$mkzflags" alias edsym=${hbin}edsym.e diff --git a/unix/hlib/mkiraf.sh b/unix/hlib/mkiraf.sh index e62072c..ff2a163 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 diff --git a/unix/hlib/setup.csh b/unix/hlib/setup.csh index b51a195..6a826c7 100755 --- a/unix/hlib/setup.csh +++ b/unix/hlib/setup.csh @@ -11,7 +11,7 @@ if ( ! ( $?IRAFARCH )) then endif source $iraf/unix/hlib/irafuser.csh -set path = ($HOME/.iraf/bin $path) +set path = ($FAKEHOME/bin $path) set cdpath = ($iraf $iraf/pkg $iraf/noao $iraf/sys $iraf/unix $iraf/unix/boot) # The world'd most obvious alias .... diff --git a/unix/hlib/setup.sh b/unix/hlib/setup.sh index fc96eeb..882bf82 100755 --- a/unix/hlib/setup.sh +++ b/unix/hlib/setup.sh @@ -1,17 +1,17 @@ #!/bin/bash # Allow a previously defined $iraf to be used. -if [ -n $iraf ]; then +if [ -z "$iraf" ]; then export iraf=/iraf/iraf/ fi # Allow a previously defined $IRAFARCH to be used. -if [ -n $IRAFARCH ]; then +if [ -z "$IRAFARCH" ]; then export IRAFARCH=`$iraf/unix/hlib/irafarch.sh -actual` fi source $iraf/unix/hlib/irafuser.sh -export PATH=$HOME/.iraf/bin:${PATH} +export PATH=$iraf/fakehome/bin:$iraf/bin:${PATH} # The world'd most obvious alias .... alias iraf="xgterm -e cl &" diff --git a/util/check_update b/util/check_update index b1973b8..e42941a 100755 --- a/util/check_update +++ b/util/check_update @@ -6,8 +6,8 @@ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/fget b/util/fget index 828f246..95f51d1 100755 --- a/util/fget +++ b/util/fget @@ -42,8 +42,8 @@ if [ -n "$iraf" ]; then fi # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source ../unix/hlib/setup.sh fi diff --git a/util/iraf_latest b/util/iraf_latest index 3246211..dde0e07 100755 --- a/util/iraf_latest +++ b/util/iraf_latest @@ -15,8 +15,8 @@ fi # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/iraf_update b/util/iraf_update index fb0f1a3..81cde51 100755 --- a/util/iraf_update +++ b/util/iraf_update @@ -65,8 +65,8 @@ fi # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/mkarch b/util/mkarch index 733dc04..22d6589 100755 --- a/util/mkarch +++ b/util/mkarch @@ -6,8 +6,8 @@ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi @@ -73,6 +73,6 @@ while [ "$loop_" == "yes" ]; do fi done -if [ -e "$HOME/.iraf/arch" ]; then - echo $arch > $HOME/.iraf/arch +if [ -e "$FAKEHOME/arch" ]; then + echo $arch > $FAKEHOME/arch fi diff --git a/util/mkbindist b/util/mkbindist index 0e1b978..abdf6b0 100755 --- a/util/mkbindist +++ b/util/mkbindist @@ -5,8 +5,8 @@ export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/5bin:/usr/ucb:/etc:/usr/etc:$PAT # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/mkclean b/util/mkclean index 57aab39..fdb42f8 100755 --- a/util/mkclean +++ b/util/mkclean @@ -8,8 +8,8 @@ export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/5bin:/usr/ucb:/etc:/usr/etc:$PAT # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/mkproto b/util/mkproto index 195bbba..71493df 100755 --- a/util/mkproto +++ b/util/mkproto @@ -16,8 +16,8 @@ tproto=/tmp/_vosproto.$$ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/mksrc b/util/mksrc index ba22dca..a57693e 100755 --- a/util/mksrc +++ b/util/mksrc @@ -6,8 +6,8 @@ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/mksysgen b/util/mksysgen index 48c4b33..7e3679b 100755 --- a/util/mksysgen +++ b/util/mksysgen @@ -3,8 +3,8 @@ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi @@ -22,12 +22,12 @@ if [ -z "$iraf" ]; then iraf=`pwd`/ fi -if [ -e "$HOME/.iraf/arch" ]; then +if [ -e "$FAKEHOME/arch" ]; then if [ -n "$IRAFARCH" ]; then - iarch=`cat $HOME/.iraf/arch` + iarch=`cat $FAKEHOME/arch` if [ "$iarch" != "$IRAFARCH" ]; then /bin/echo "" - /bin/echo 'Error: Your $IRAFARCH does not match $HOME/.iraf/arch,' + /bin/echo 'Error: Your $IRAFARCH does not match $FAKEHOME/arch,' /bin/echo ' Please change $IRAFARCH or rerun install script.' /bin/echo "" exit 1 diff --git a/util/mkup b/util/mkup index ed4499f..9867caa 100755 --- a/util/mkup +++ b/util/mkup @@ -3,8 +3,8 @@ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/mkupx b/util/mkupx index 126c3e8..71cace7 100755 --- a/util/mkupx +++ b/util/mkupx @@ -3,8 +3,8 @@ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/pkgconfig b/util/pkgconfig index e5e6c51..14b22b3 100755 --- a/util/pkgconfig +++ b/util/pkgconfig @@ -6,8 +6,8 @@ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi diff --git a/util/pkgdel b/util/pkgdel index f7d5256..a2f47bc 100755 --- a/util/pkgdel +++ b/util/pkgdel @@ -8,8 +8,8 @@ irafdir=${bindir%/*} # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source ../unix/hlib/setup.sh fi diff --git a/util/pkgget b/util/pkgget index fba02c0..ef3acc4 100755 --- a/util/pkgget +++ b/util/pkgget @@ -20,8 +20,8 @@ export PATH=../util:$PATH # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source ../unix/hlib/setup.sh fi diff --git a/util/pkginit b/util/pkginit index a484d52..7259be7 100755 --- a/util/pkginit +++ b/util/pkginit @@ -8,8 +8,8 @@ irafdir=${bindir%/*} # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source ../unix/hlib/setup.sh fi diff --git a/util/pkginst b/util/pkginst index d4a83a2..22672f1 100755 --- a/util/pkginst +++ b/util/pkginst @@ -13,8 +13,8 @@ irafdir=${bindir%/*} # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source ../unix/hlib/setup.sh fi diff --git a/util/pkgupdate b/util/pkgupdate index ea73ec1..abf079d 100755 --- a/util/pkgupdate +++ b/util/pkgupdate @@ -35,8 +35,8 @@ irafdir=${bindir%/*} # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source ../unix/hlib/setup.sh fi diff --git a/util/self_update b/util/self_update index f5896d4..8e43890 100755 --- a/util/self_update +++ b/util/self_update @@ -5,8 +5,8 @@ # Initialize the $iraf and environment. if [ -z "$iraf" ]; then - if [ -e "$HOME/.iraf/setup.sh" ]; then - source $HOME/.iraf/setup.sh + if [ -e "$FAKEHOME/setup.sh" ]; then + source $FAKEHOME/setup.sh else source unix/hlib/setup.sh fi