rc.sh

来自「OTP是开放电信平台的简称」· Shell 代码 · 共 69 行

SH
69
字号
#! /bin/sh# set -x# Save the command line for debug outputsSAVE="$@"CMD=""OUTPUT_FILENAME=""# Find the correct rc.exe. This could be done by the configure script,# But as we seldom use the resource compiler, it might as well be done here...RCC=""save_ifs=$IFSIFS=:for p in $PATH; do     if [ -f $p/rc.exe ]; then 	if [ -n "`$p/rc.exe -? 2>&1 | grep -i "resource compiler"`" ]; then 	    RCC=$p/rc.exe	fi    fidoneIFS=$save_ifsif [ -z "$RCC" ]; then    echo 'rc.exe not found!' >&2    exit 1fiwhile test -n "$1" ; do    x="$1"    case "$x" in	-o)	    shift	    MPATH=`cygpath -m $1`;	    OUTPUT_FILENAME="$MPATH";;	-o/*)	    y=`echo $x | sed 's,^-[Io]\(/.*\),\1,g'`;	    MPATH=`cygpath -m $y`;	    OUTPUT_FILENAME="$MPATH";;	-I)	    shift	    MPATH=`cygpath -m $1`;	    CMD="$CMD -I\"$MPATH\"";;	-I/*)	    y=`echo $x | sed 's,^-[Io]\(/.*\),\1,g'`;	    MPATH=`cygpath -m $y`;	    CMD="$CMD -I\"$MPATH\"";;	/*)	    MPATH=`cygpath -m $x`;	    CMD="$CMD \"$MPATH\"";; 	*)	    y=`echo $x | sed 's,",\\\",g'`;	    CMD="$CMD \"$y\"";;    esac    shiftdonep=$$if [ -n "$OUTPUT_FILENAME" ]; then    CMD="-Fo$OUTPUT_FILENAME $CMD"fiif [ "X$RC_SH_DEBUG_LOG" != "X" ]; then    echo rc.sh "$SAVE" >>$RC_SH_DEBUG_LOG    echo rc.exe $CMD >>$RC_SH_DEBUG_LOGfieval $RCC "$CMD"  >/tmp/rc.exe.${p}.1 2>/tmp/rc.exe.${p}.2RES=$?tail +2 /tmp/rc.exe.${p}.2 >&2cat /tmp/rc.exe.${p}.1rm -f /tmp/rc.exe.${p}.2 /tmp/rc.exe.${p}.1exit $RES

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?