From: drjaska Date: Thu, 22 Aug 2024 04:56:01 +0000 (+0300) Subject: Move {CS,SV,MENU}QC to printf argument for better alignment X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=664351b5bec822efa3c39d2f2b1a5933c668bc1f;p=xonotic%2Fxonotic-data.pk3dir.git Move {CS,SV,MENU}QC to printf argument for better alignment --- diff --git a/qcsrc/tools/genmod.sh b/qcsrc/tools/genmod.sh index 781a37b0d..5dfb5210e 100755 --- a/qcsrc/tools/genmod.sh +++ b/qcsrc/tools/genmod.sh @@ -43,15 +43,15 @@ function genmod() { # skip .qc files if [[ "$f" != *.qc ]]; then continue; fi - if [[ -f "$f" ]]; then printf "#include <%s>\n" "${CTX}$f" >> ${MOD}.inc; fi - if [[ -f "${f%.qc}.qh" ]]; then printf "#include <%s>\n" "${CTX}${f%.qc}.qh" >> ${MOD}.qh; fi - - if [[ -f "cl_$f" ]]; then printf "#ifdef CSQC\n #include <%s>\n#endif\n" "${CTX}cl_$f" >> ${MOD}.inc; fi - if [[ -f "cl_${f%.qc}.qh" ]]; then printf "#ifdef CSQC\n #include <%s>\n#endif\n" "${CTX}cl_${f%.qc}.qh" >> ${MOD}.qh; fi - if [[ -f "sv_$f" ]]; then printf "#ifdef SVQC\n #include <%s>\n#endif\n" "${CTX}sv_$f" >> ${MOD}.inc; fi - if [[ -f "sv_${f%.qc}.qh" ]]; then printf "#ifdef SVQC\n #include <%s>\n#endif\n" "${CTX}sv_${f%.qc}.qh" >> ${MOD}.qh; fi - if [[ -f "ui_$f" ]]; then printf "#ifdef MENUQC\n #include <%s>\n#endif\n" "${CTX}ui_$f" >> ${MOD}.inc; fi - if [[ -f "ui_${f%.qc}.qh" ]]; then printf "#ifdef MENUQC\n #include <%s>\n#endif\n" "${CTX}ui_${f%.qc}.qh" >> ${MOD}.qh; fi + if [[ -f "$f" ]]; then printf "#include <%s>\n" "${CTX}$f" >> ${MOD}.inc; fi + if [[ -f "${f%.qc}.qh" ]]; then printf "#include <%s>\n" "${CTX}${f%.qc}.qh" >> ${MOD}.qh; fi + + if [[ -f "cl_$f" ]]; then printf "#ifdef %s\n\t#include <%s>\n#endif\n" CSQC "${CTX}cl_$f" >> ${MOD}.inc; fi + if [[ -f "cl_${f%.qc}.qh" ]]; then printf "#ifdef %s\n\t#include <%s>\n#endif\n" CSQC "${CTX}cl_${f%.qc}.qh" >> ${MOD}.qh; fi + if [[ -f "sv_$f" ]]; then printf "#ifdef %s\n\t#include <%s>\n#endif\n" SVQC "${CTX}sv_$f" >> ${MOD}.inc; fi + if [[ -f "sv_${f%.qc}.qh" ]]; then printf "#ifdef %s\n\t#include <%s>\n#endif\n" SVQC "${CTX}sv_${f%.qc}.qh" >> ${MOD}.qh; fi + if [[ -f "ui_$f" ]]; then printf "#ifdef %s\n\t#include <%s>\n#endif\n" MENUQC "${CTX}ui_$f" >> ${MOD}.inc; fi + if [[ -f "ui_${f%.qc}.qh" ]]; then printf "#ifdef %s\n\t#include <%s>\n#endif\n" MENUQC "${CTX}ui_${f%.qc}.qh" >> ${MOD}.qh; fi done declare -l rec=1