Silence which
output (reliably)
"which -s" is not available on all platforms
This commit is contained in:
parent
5680e7596b
commit
233d428c0f
1 changed files with 9 additions and 9 deletions
|
@ -1,18 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
require_dep() {
|
||||
find_dep() {
|
||||
dep=$1
|
||||
which -s $dep
|
||||
which $dep > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo found: $dep
|
||||
else
|
||||
echo $dep is required, but not installed
|
||||
echo error: $dep is required, but not installed
|
||||
fi
|
||||
}
|
||||
|
||||
require_dep ruby
|
||||
require_dep bundle
|
||||
require_dep node
|
||||
require_dep npm
|
||||
require_dep nginx
|
||||
require_dep doas
|
||||
find_dep ruby
|
||||
find_dep bundle
|
||||
find_dep node
|
||||
find_dep npm
|
||||
find_dep nginx
|
||||
find_dep doas
|
||||
|
|
Loading…
Reference in a new issue