From 63165e8152a741ade25046d1906771a54b518950 Mon Sep 17 00:00:00 2001 From: MissLavender-LQ Date: Thu, 28 Sep 2023 06:17:50 +0100 Subject: [PATCH] linux build scripts --- build_assets.sh => .build_assets.sh | 0 build.sh | 67 ++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 2 deletions(-) rename build_assets.sh => .build_assets.sh (100%) mode change 100644 => 100755 diff --git a/build_assets.sh b/.build_assets.sh old mode 100644 new mode 100755 similarity index 100% rename from build_assets.sh rename to .build_assets.sh diff --git a/build.sh b/build.sh index 4dd2682b..be83c952 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,66 @@ #!/bin/bash -premake5 gmake; -make config=release all; +function -r { + premake5 gmake; + make config=release all; +} + +function -d { + premake5 gmake; + make config=debug all; +} + +function -a { + bash .build_assets.sh; +} + +function -c { + make clean; + echo -e "=====Cleaning done====="; +} + + +function -h { + echo -e " + ========================================================================== + run ./build.sh -r to compile for release + run ./build.sh -d to compile for debug + run ./build.sh -c to run make clean (start fresh) + run ./build.sh -h to read this msg :3 + ========================================================================== + "; +} + + +### command list ### +case $1 in + -r) + -r + ;; + + -d) + -d + ;; + + -a) + -a + ;; + + -c) + -c + ;; + + -h) + -h + ;; + + *) + echo -e " + ========================================================================== + run ./build.sh -r to compile for release + run ./build.sh -d to compile for debug + run ./build.sh -c to run make clean (start fresh) + run ./build.sh -h to read this msg :3 + ========================================================================== + " + +esac