lumina/build.sh
2023-06-17 06:36:16 -05:00

31 lines
690 B
Bash
Executable file

#!/bin/sh
function build_debug () {
cmake -B bld/ .
make -j8 --dir bld/
rm -rf ~/.cache/librepresenter/Libre\ Presenter/qmlcache/
}
function build_release () {
cmake -DCMAKE_BUILD_TYPE=Release -B bld/ .
make -j8 --dir bld/
rm -rf ~/.cache/librepresenter/Libre\ Presenter/qmlcache/
}
while [[ $# -gt 0 ]]; do
case $1 in
-d|--debug)
build_debug
shift # past value
;;
-r|--release)
build_release
shift # past value
;;
*)
POSITIONAL_ARGS+=("$1") # save positional arg
build_debug
shift # past argument
;;
esac
done