OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [tn_m001/] [newlib/] [install-sh] - Diff between revs 39 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 39 Rev 56
Line 51... Line 51...
rmcmd="$rmprog -f"
rmcmd="$rmprog -f"
mvcmd="$mvprog"
mvcmd="$mvprog"
src=""
src=""
dst=""
dst=""
dir_arg=""
dir_arg=""
# CYGNUS LOCAL: exeext variable
 
exeext=""
 
# END CYGNUS LOCAL
 
 
 
while [ x"$1" != x ]; do
while [ x"$1" != x ]; do
    case $1 in
    case $1 in
        -c) instcmd="$cpprog"
        -c) instcmd="$cpprog"
            shift
            shift
Line 92... Line 89...
 
 
        -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
        -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
            shift
            shift
            continue;;
            continue;;
 
 
        # CYGNUS LOCAL: -x option
 
        -x=*) exeext=`echo $1 | sed 's/-x=//'`
 
            shift
 
            continue;;
 
 
 
        -x) exeext=".exe"
 
            shift
 
            continue;;
 
        # END CYGNUS LOCAL
 
 
 
        *)  if [ x"$src" = x ]
        *)  if [ x"$src" = x ]
            then
            then
                src=$1
                src=$1
            else
            else
                # this colon is to work around a 386BSD /bin/sh bug
                # this colon is to work around a 386BSD /bin/sh bug
Line 135... Line 122...
        else
        else
                instcmd=mkdir
                instcmd=mkdir
        fi
        fi
else
else
 
 
# CYGNUS LOCAL noer
 
# Win32-based gcc automatically appends .exe to produced executables,
 
# whether asked for or not.  This breaks installs.  The following
 
# changes the value of $src to $src.exe if $src is missing
 
 
 
        if [ -f $src ]
 
        then
 
                true
 
        elif [ -f $src.exe ]
 
        then
 
                echo "install:  $src does not exist, trying with .exe appended"
 
                src="$src".exe
 
        fi
 
 
 
# end CYGNUS LOCAL noer
 
 
 
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
# if $src (and thus $dsttmp) contains '*'.
 
 
        if [ -f $src -o -d $src ]
        if [ -f $src -o -d $src ]
Line 180... Line 151...
        then
        then
                dst="$dst"/`basename $src`
                dst="$dst"/`basename $src`
        else
        else
                true
                true
        fi
        fi
 
 
        # CYGNUS LOCAL: Use exeext
 
        case "`basename $dst`" in
 
            *.*) ;;
 
            *) dst="$dst$exeext" ;;
 
        esac
 
        # END CYGNUS LOCAL
 
fi
fi
 
 
## this sed command emulates the dirname command
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.