Repository: ustc-zzzz/fmltutor
Branch: patch
Commit: 658ea9cc9600
Files: 6
Total size: 3.7 KB
Directory structure:
gitextract_9b3j48oa/
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── build.sh
└── generate-patches.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
patch/* linguist-vendored=false
patch/* linguist-language=Java
================================================
FILE: .gitignore
================================================
# exclude all
/*
# patches
!patch/
# scripts
!*.sh
# include markdowns
!LICENSE
!README.md
# include git important files
!.gitattributes
!.gitmodules
!.gitignore
# travis
!.travis.yml
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Yanbing Zhao
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Minecraft 1.8.9 FML Mod 开发教程
欢迎来到本教程的源代码仓库!
由于相关代码严重过时,本教程于2020年11月4日正式封存。
如果对教程有疑问,可以通过电邮的方式联系本人:[zzzz@infstudio.net](mailto:zzzz@infstudio.net)。
教程所属的代码仓库的`master`分支是根据所有维护的patch自动生成的,教程的文字部分由`book`分支维护,代码部分由`patch`分支维护。
## 版权声明
本作品作者为ustc\_zzzz。
[Infinity Studio小组](https://www.infstudio.net/)与本作品作者共有版权。
本作品采用
知识共享署名-相同方式共享 4.0 国际许可协议
进行许可。
转载请附上本作品链接:
所有源代码使用[MIT协议](LICENSE)开源。
感谢[Team CovertDragon](https://covertdragon.team/),鉴于该团队为本教程提供的机房位于中华人民共和国香港特别行政区的阿里云服务器。
================================================
FILE: build.sh
================================================
#!/bin/bash
function do-apply
{
cp ../LICENSE LICENSE
git init
git add LICENSE
git commit -m "Initial commit" >/dev/null
git tag -f start
echo -n "Applying patches: "
git am --whitespace=nowarn --keep-cr ../patch/*.patch | while read m
do echo -n '.'; done
echo " done"
}
function do-clean
{
[ -d files/ ] && pushd files >/dev/null
if [ $? -eq 0 ]
then
for file in $(git ls-files)
do
rm -f $file
done
rm -rf .git/
find . -type d -empty -delete
popd >/dev/null
fi
}
function do-build
{
mkdir -p files/ && pushd files >/dev/null
if [ $? -eq 0 ]
then
do-apply
popd >/dev/null
fi
}
cd $(dirname $0)
case $1 in
build) do-build;;
clean) do-clean;;
*) do-clean; do-build;;
esac
================================================
FILE: generate-patches.sh
================================================
#!/bin/bash
function do-apply
{
prefix="../patch"
rm *.patch 2>/dev/null
patches="$(git -c format.from=Yanbing\ Zhao\ \ \
format-patch start..master --minimal --keep-subject --zero-commit \
--no-add-header --no-stat --no-signature)"
if [ $? -eq 0 ]
then
for name in $patches
do
pattern="*${name:5:-6}*.patch"
newname="$(cd ${prefix} && ls ${pattern} 2>/dev/null | head -n1)"
if [ -z "$newname" ]
then
echo -n "Please define a description for $name: "
read description
newname="${name:0:5}$description.patch"
fi
mv $name ${newname}
echo ${newname}
done
rm ${prefix}/*.patch
mv *.patch ${prefix}
fi
}
cd $(dirname $0)
cd files && do-apply