|
|
@ -1,5 +1,21 @@ |
|
|
|
#!/bin/bash |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do_build() { |
|
|
|
|
|
|
|
(cd "$(dirname "${DIR}")" \ |
|
|
|
|
|
|
|
&& meson build \ |
|
|
|
|
|
|
|
&& cd build \ |
|
|
|
|
|
|
|
&& ninja) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clean_build_dir() { |
|
|
|
|
|
|
|
(cd "${DIR}" \ |
|
|
|
|
|
|
|
&& find . -type f ! -path './ci*' ! -name '.gitignore' ! -name utils.sh -delete \ |
|
|
|
|
|
|
|
&& find . -type d ! -path './ci' -delete \ |
|
|
|
|
|
|
|
&& { rm ../src/gresource/js/bundle.js || true; }) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
combine_javascript_sources() { |
|
|
|
combine_javascript_sources() { |
|
|
|
cd "${MESON_SOURCE_ROOT}/src/gresource/js" && { |
|
|
|
cd "${MESON_SOURCE_ROOT}/src/gresource/js" && { |
|
|
@ -25,4 +41,12 @@ case "$1" in |
|
|
|
get-js-files) |
|
|
|
get-js-files) |
|
|
|
list_javascript_sources |
|
|
|
list_javascript_sources |
|
|
|
;; |
|
|
|
;; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clean-build-dir) |
|
|
|
|
|
|
|
clean_build_dir |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build) |
|
|
|
|
|
|
|
clean_build_dir && do_build |
|
|
|
|
|
|
|
;; |
|
|
|
esac |
|
|
|
esac |
|
|
|