📄 apply.sh
字号:
#!/bin/sh#### apply.sh -- Apply a patch## Copyright (c) 1998-2004 Ralf S. Engelschall, All Rights Reserved. ### parameterscookiestr="$1"cookiefile="$2"patchprg="$3"patchfile="$4"applydir="$5"prefix="$6"display="$7"if [ ".`grep $cookiestr $cookiefile`" = . ]; then cat $patchfile |\ $patchprg --forward --directory $applydir 2>&1 |\ tee config.log |\ egrep '^.Index:' | sed -e "s/.*Index: /$prefix patching: [FILE] /" |\ eval $display failed=0 if [ ".`grep $cookiestr $cookiefile`" = . ]; then failed=1 fi if [ ".`cd $applydir; find . -name '*.rej' -print`" != . ]; then failed=1 fi if [ ".$failed" = .1 ]; then echo "Error: Application of patch failed:" 1>&2 echo "-------------------------------------------------" 1>&2 tail config.log 1>&2 echo "-------------------------------------------------" 1>&2 exit 1 else rm -f config.log fielse cat $patchfile |\ egrep '^Index:' | sed -e "s/.*Index: /$prefix skipping: [FILE] /" |\ eval $displayfi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -