aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall45
1 files changed, 35 insertions, 10 deletions
diff --git a/install b/install
index b8f29a91..42e7cb81 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 <term> # set default terminal type
# -b, --bindir <dir> # set local bin directory
@@ -116,6 +117,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 <term> # set default terminal type"
ECHO " -b, --bindir <dir> # set local bin directory"
@@ -167,7 +169,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
;;
@@ -276,7 +280,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
@@ -429,7 +436,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"
@@ -491,8 +501,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"
@@ -555,7 +567,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"
@@ -617,7 +631,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"
@@ -643,7 +660,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..."
@@ -678,7 +697,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
@@ -811,7 +832,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
@@ -911,7 +934,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