Both the subdir and prepare arguments are very specific to
building the extensions-tool subproject stand-alone. In order
to make the script more generic, turn those required arguments
into optional --subdir and --prepare ones.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
We currently remove the directory at the end of the script, but
that code is only reached when all previous operations were
successful.
Address this by first using an absolute directory path in /tmp
instead of a "random" location based on the CWD, then set a trap
to remove it on exit.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
The script has four mandatory arguments, and also accepts optional
build options that are passed on to meson. Checking for the number
of arguments *before* filtering out the optional ones means that
`./install-meson-project.sh -Done=1 -Dtwo=2 -Dthree=3 -Dfour=4`
is considered valid, even though not a single required argument
is passed.
Fix this by filtering out the arguments before doing the usage
check. As it is a nice touch to have usage information at the
top of the script, move the message into a usage() function at
the top.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
This rebuilds the automaticaly whenever the image tag changes. Whenever
something in the image needs to change, alter the installation script
and change the tag to the current date.
This removes the -s (strict) argument from js68, as it doesn't exist in
js78.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1492>