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