Last active
August 16, 2023 13:03
-
-
Save pilot22/724b472792aae656242c3c26e79bf087 to your computer and use it in GitHub Desktop.
Simple batch file to create an simple gmod addon :D
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /p e=Quel nom?: | |
set /p abv=Quel table?: | |
mkdir %e% | |
cd %e% | |
mkdir lua | |
cd lua | |
mkdir autorun | |
cd autorun | |
echo %abv% = %abv% or {}> "%e%_loader.lua" | |
echo. >> "%e%_loader.lua" | |
echo local function loadFile(strPath, folder)>> "%e%_loader.lua" | |
echo local files, folders = file.Find(strPath .. "*", "LUA")>> "%e%_loader.lua" | |
echo. >> "%e%_loader.lua" | |
echo for _, v in pairs(files) do>> "%e%_loader.lua" | |
echo if SERVER then>> "%e%_loader.lua" | |
echo if string.find(v, "cl_") or string.find(v, "sh_") or string.find(strPath, "cl") or string.find(strPath, "sh") then>> "%e%_loader.lua" | |
echo AddCSLuaFile(strPath .. v)>> "%e%_loader.lua" | |
echo end>> "%e%_loader.lua" | |
echo. >> "%e%_loader.lua" | |
echo if string.find(v, "sv_") or string.find(v, "sh_") or string.find(strPath, "server") or string.find(strPath, "sh") then>> "%e%_loader.lua" | |
echo include(strPath .. v)>> "%e%_loader.lua" | |
echo end>> "%e%_loader.lua" | |
echo else>> "%e%_loader.lua" | |
echo include(strPath .. v)>> "%e%_loader.lua" | |
echo end>> "%e%_loader.lua" | |
echo end>> "%e%_loader.lua" | |
echo.>> "%e%_loader.lua" | |
echo for _, v in pairs(folders) do>> "%e%_loader.lua" | |
echo loadFile(strPath .. v .. "/", v)>> "%e%_loader.lua" | |
echo end>> "%e%_loader.lua" | |
echo end>> "%e%_loader.lua" | |
echo.>> "%e%_loader.lua" | |
echo loadFile("%e%/")>> "%e%_loader.lua" | |
cd .. | |
mkdir %e% | |
cd %e% | |
echo %abv%.Config = %abv%.Config or {}>>"sh_config.lua" | |
mkdir client | |
cd client | |
echo -- >>"cl.lua" | |
cd .. | |
mkdir shared | |
cd shared | |
echo -- >>"sh.lua" | |
cd .. | |
mkdir server | |
cd server | |
echo -- >>"sv.lua" | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment