diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-04-05 18:18:56 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-04-05 22:18:31 +0200 |
commit | 99d8cbceffbae7ce58f47ed4c099bff574689ae4 (patch) | |
tree | 4acc4436381efe42cd7d971574024440fb015d6b /src | |
parent | 8f04a1ca2bf973e5419c32adca1dcf888e0b263f (diff) | |
download | systemd-99d8cbceffbae7ce58f47ed4c099bff574689ae4.tar.gz |
meson: make kernel-install a template file, add --version, add to tests
In --help output, change "$0" → "kernel-install". We generally don't include
the full path in --help output, and let's not do this here either.
kernel-install is now in build/ directly, not in the subdirectory.
Diffstat (limited to 'src')
-rwxr-xr-x | src/kernel-install/kernel-install.in (renamed from src/kernel-install/kernel-install) | 16 | ||||
-rw-r--r-- | src/kernel-install/meson.build | 6 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install.in index a09b998362..f6d262f522 100755 --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install.in @@ -23,11 +23,12 @@ skip_remaining=77 usage() { echo "Usage:" - echo " $0 [OPTIONS...] add KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE ...]" - echo " $0 [OPTIONS...] remove KERNEL-VERSION" - echo " $0 [OPTIONS...] inspect" + echo " kernel-install [OPTIONS...] add KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE...]" + echo " kernel-install [OPTIONS...] remove KERNEL-VERSION" + echo " kernel-install [OPTIONS...] inspect" echo "Options:" - echo " -h, --help Print this help" + echo " -h, --help Print this help and exit" + echo " --version Print version string and exit" echo " -v, --verbose Increase verbosity" } @@ -59,6 +60,13 @@ for i; do fi done +for i; do + if [ "$i" = "--version" ]; then + echo "kernel-install {{PROJECT_VERSION}} ({{GIT_VERSION}})" + exit 0 + fi +done + export KERNEL_INSTALL_VERBOSE=0 if [ "$1" = "--verbose" ] || [ "$1" = "-v" ]; then shift diff --git a/src/kernel-install/meson.build b/src/kernel-install/meson.build index abc3520b62..06c1c3aafb 100644 --- a/src/kernel-install/meson.build +++ b/src/kernel-install/meson.build @@ -1,10 +1,8 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -if want_kernel_install - install_data('kernel-install', - install_mode : 'rwxr-xr-x', - install_dir : bindir) +kernel_install_in = files('kernel-install.in') +if want_kernel_install install_data('50-depmod.install', '90-loaderentry.install', install_mode : 'rwxr-xr-x', |