diff options
author | johnraff <github@rafflesnagoya.com> | 2020-05-01 11:23:39 +0900 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-05-01 09:59:11 +0000 |
commit | 0e5d0483e5596e200430d28356b808af76806439 (patch) | |
tree | 66ea8d81afc59322bedce8c738f32fa737877bd1 /share/hooks/normal/0410-update-apt-xapian-index.hook.chroot | |
parent | fd18d46e0eb6abfe757f8764c65ac4c472fcdeef (diff) | |
download | vyos-live-build-0e5d0483e5596e200430d28356b808af76806439.tar.gz vyos-live-build-0e5d0483e5596e200430d28356b808af76806439.zip |
Replace 'which' with 'command -v' to test for the existance of an executable
This is considered to be more robust.
Two instances remain:
scripts/build/chroot_archives, line 257:
if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ]
The command is run inside a chroot where the environment might be special,
and would need further testing.
manpages/Makefile, line 42:
@if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
I am insufficiently familiar with makefile syntax to edit this.
Diffstat (limited to 'share/hooks/normal/0410-update-apt-xapian-index.hook.chroot')
-rwxr-xr-x | share/hooks/normal/0410-update-apt-xapian-index.hook.chroot | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/hooks/normal/0410-update-apt-xapian-index.hook.chroot b/share/hooks/normal/0410-update-apt-xapian-index.hook.chroot index 93801e511..f737ad171 100755 --- a/share/hooks/normal/0410-update-apt-xapian-index.hook.chroot +++ b/share/hooks/normal/0410-update-apt-xapian-index.hook.chroot @@ -8,7 +8,7 @@ set -e # is not allowed to, and (b) it wants to build the index in the background which # will be racy in the context of live-build. -if [ $(which update-apt-xapian-index) ] +if command -v update-apt-xapian-index >/dev/null then PYTHONDONTWRITEBYTECODE=1 update-apt-xapian-index --force --quiet fi |