Changeset 5000a26 for installer


Ignore:
Timestamp:
Nov 20, 2017 11:06:06 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1738236
Parents:
14e9315
Message:

i2prouter: Fix echo -n on OSX

File:
1 edited

Legend:

Unmodified
Added
Removed
  • installer/resources/i2prouter

    r14e9315 r5000a26  
    509509if [ "$ECHOTEST" = "x" ]
    510510then
    511     ECHOOPT="-n "
     511    ECHO_MINUS_N="echo -n "
    512512else
    513     ECHOOPT=""
     513    # on OSX, sh builtin echo doesn't support -n, but /bin/echo does
     514    ECHOTEST=`/bin/echo -n "x"`
     515    if [ "$ECHOTEST" = "x" ]
     516    then
     517        ECHO_MINUS_N="/bin/echo -n "
     518    else
     519        ECHO_MINUS_N="echo "
     520    fi
    514521fi
    515522
     
    10211028waitforjavastartup() {
    10221029    getstatus
    1023     eval echo $ECHOOPT "`gettext 'Waiting for $APP_LONG_NAME'`..."
     1030    eval $ECHO_MINUS_N "`gettext 'Waiting for $APP_LONG_NAME'`..."
    10241031
    10251032    # Wait until the timeout or we have something besides Unknown.
    10261033    counter=15
    10271034    while [ "$JAVASTATUS" = "Unknown" -a $counter -gt 0 -a -n "$JAVASTATUS" ] ; do
    1028         echo $ECHOOPT"."
     1035        $ECHO_MINUS_N "."
    10291036        sleep 1
    10301037        getstatus
     
    10381045    fi
    10391046    while [ "$JAVASTATUS" != "STARTED" -a "$JAVASTATUS" != "Unknown" -a $counter -gt 0 -a -n "$JAVASTATUS" ] ; do
    1040         echo $ECHOOPT"."
     1047        $ECHO_MINUS_N "."
    10411048        sleep 1
    10421049        getstatus
    10431050        counter=`expr $counter - 1`
    10441051    done
    1045     if [ "X$ECHOOPT" != "X" ] ; then
     1052    if [ "$ECHO_MINUS_N" != "echo " ] ; then
    10461053        echo ""
    10471054    fi
     
    10601067    do
    10611068        sleep 1
    1062         echo $ECHOOPT"."
     1069        $ECHO_MINUS_N "."
    10631070        i=`expr $i + 1`
    10641071    done
Note: See TracChangeset for help on using the changeset viewer.