rc.sh

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

SH
77
字号
#! /bin/sh# set -x# Save the command line for debug outputsSAVE="$@"CMD=""OUTPUT_FILENAME=""if [ -z "$MINGW_EXE_PATH" ]; then    echo "You have to set MINGW_EXE_PATH to run rc.sh" >&2    exit 1fi# # 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=$IFS# IFS=:# for p in $PATH; do #     if [ -f $p/windres.exe ]; then # 	if [ -n "`$p/windres.exe --version 2>&1 | grep -i "GNU windres"`" ]; then # 	    RCC=$p/windres.exe# 	fi#     fi# done# IFS=$save_ifsRCC=$MINGW_EXE_PATH/windres.exeif [ -z "$RCC" ]; then    echo 'windres.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="-o $OUTPUT_FILENAME $CMD"fiif [ "X$RC_SH_DEBUG_LOG" != "X" ]; then    echo rc.sh "$SAVE" >>$RC_SH_DEBUG_LOG    echo windres.exe $CMD >>$RC_SH_DEBUG_LOGfieval $RCC "$CMD"  >/tmp/rc.exe.${p}.1 2>/tmp/rc.exe.${p}.2RES=$?cat /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 + -
显示快捷键?