1 Star 0 Fork 0

Toby_lai/craftbukkit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
applyPatches.sh 829 Bytes
一键复制 编辑 原始数据 按行查看 历史
md_5 提交于 2021-03-16 09:00 . Repackage NMS
#!/bin/bash
set -euo pipefail
if [ -z "$1" ]
then
echo "Please run this script again with the clean decompile sources as an argument. In most cases this will be ../work/decompile-XXXX"
exit
fi
# https://stackoverflow.com/a/38595160
# https://stackoverflow.com/a/800644
if sed --version >/dev/null 2>&1; then
strip_cr() {
sed -i -- "s/\r//" "$@"
}
else
strip_cr () {
sed -i "" "s/$(printf '\r')//" "$@"
}
fi
nms=$1
cb=src/main/java
#clean up and rebuild
rm -rf $cb/net
for file in $(find nms-patches -type f -printf '%P\n')
do
patchFile="$file"
file="$(echo $file | cut -d. -f1).java"
echo "Patching $file < $patchFile"
strip_cr "$nms/$file" > /dev/null
mkdir -p $(dirname $cb/$file)
cp "$nms/$file" "$cb/$file"
patch -d src/main/java -p 1 < "nms-patches/$patchFile"
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/toby_lai/craftbukkit.git
git@gitee.com:toby_lai/craftbukkit.git
toby_lai
craftbukkit
craftbukkit
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385