-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcheck_apps.sh
More file actions
executable file
·31 lines (28 loc) · 825 Bytes
/
Copy pathcheck_apps.sh
File metadata and controls
executable file
·31 lines (28 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
set -e
for APP in \
curl wget git tar unzip gunzip ip \
zsh tmux \
xsel fzf \
gcc g++ cmake ccache ninja \
sqlite3; do
echo -n "Checking $APP... "
command -v $APP || (echo "not found" && false)
done
# check libraries (not CLI commands)
# shellcheck disable=SC2043
for LIB in \
libclang; do
echo -n "Checking $LIB... "
if [[ "$(uname)" == "Darwin" ]]; then
# macOS: search in Xcode/CommandLineTools and Homebrew paths
find /Library/Developer/CommandLineTools/usr/lib \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib \
/opt/homebrew/opt/llvm/lib \
/usr/local/opt/llvm/lib \
-name "${LIB}*" -print -quit 2>/dev/null | grep -q . || (echo "not found" && false)
else
ldconfig -p | grep -q "$LIB" || (echo "not found" && false)
fi
echo "ok"
done