fix: the reencode dialog codec help text being weirdly coloured on different platforms

refactor: build.sh
This commit is contained in:
2026-07-01 21:45:03 +02:00
parent 1a00e98661
commit 515404a220
2 changed files with 36 additions and 11 deletions
+34 -6
View File
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -e
RED="\e[1;31m"
GREEN="\e[1;32m"
BLUE="\e[1;34m"
RESET="\e[0m"
clean() {
echo "cleaning build dir"
rm -rf build
@@ -14,12 +19,30 @@ incremental_build() {
}
clean_build() {
local starttime endtime elapsed
starttime=$(date +%s)
clean
mkdir build
cd build
echo "doing a clean build"
cmake ..
make -j"$(nproc)"
mkdir -p build
cd build || return 1
printf "${BLUE}==> Doing a clean build...${RESET}\n"
cmake .. || {
printf "${RED}CMake configuration failed.${RESET}\n"
return 1
}
if make -j"$(nproc)"; then
endtime=$(date +%s)
elapsed=$((endtime - starttime))
printf "${GREEN}Build completed in %d seconds.${RESET}\n" "$elapsed"
else
printf "${RED}Build failed.${RESET}\n"
return 1
fi
}
release_build() {
@@ -67,7 +90,12 @@ case "${1:-build}" in
clean_appimage
;;
cbr|clean_build_run)
clean_build && run_executable
clean_build || exit 1
# build leaves us in build dir, so change back 1 so we can run the exec
cd ..
printf "${BLUE} Running Executable ; All logs below are from SubWave ${RESET}"
run_executable || exit 1
printf "${BLUE} Completed running the executable ; DONE ${RESET}\n"
;;
*)
echo "Usage: $0 {build|clean|cleanbuild|cb}"