1
0
Fork 0
mutter-performance-source/.gitlab-ci/install-common-dependencies.sh
Florian Müllner 40773765df ci: Fix install-common-dependencies.sh -h
The option is advertised as alternative to --help, but doesn't
actually work. While not super important for a script that isn't
user facing, it's a trivial fix and doesn't hurt.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4074>
2024-10-09 00:57:31 +02:00

66 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
set -e
usage() {
cat <<-EOF
Usage: $(basename $0) [OPTION…]
Install common dependencies to a base image or system extension
Options:
--libdir=DIR Setup the projects with a different libdir
--destdir=DIR Install the projects to an additional destdir
-h, --help Display this help
EOF
}
TEMP=$(getopt \
--name=$(basename $0) \
--options='h' \
--longoptions='libdir:' \
--longoptions='destdir:' \
--longoptions='help' \
-- "$@")
eval set -- "$TEMP"
unset TEMP
OPTIONS=()
while true; do
case "$1" in
--libdir)
OPTIONS+=( --libdir=$2 )
shift 2
;;
--destdir)
OPTIONS+=( --destdir=$2 )
shift 2
;;
-h|--help)
usage
exit 0
;;
--)
shift
break
;;
esac
done
SCRIPTS_DIR="$(dirname $0)"
## Add necessary dependencies here, for example
# if ! pkgconf --atleast-version 1.23.0 wayland-server
# then
# ./$SCRIPTS_DIR/install-meson-project.sh \
# "${OPTIONS[@]}" \
# https://gitlab.freedesktop.org/wayland/wayland.git \
# 1.23.0
# fi