-
Notifications
You must be signed in to change notification settings - Fork 32
/
deps-check.sh
executable file
·29 lines (23 loc) · 1.09 KB
/
deps-check.sh
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
#!/bin/bash
# init colors
txtnon='\e[0m' # color reset
txtred='\e[0;31m' # Red
failed=false
function fail() {
printf "$txtred%s$txtnon\n" "$*"
failed=true
}
(ipfs version > /dev/null 2>&1) || fail "Missing ipfs, please install it :-)"
(ipfs swarm peers > /dev/null 2>&1) || fail "ipfs is offline, please run ipfs daemon"
(awk --version > /dev/null 2>&1) || fail "Missing awk, please install it"
(date | shasum -a 512 - > /dev/null 2>&1) ||
(date | sha512sum - > /dev/null 2>&1) || fail "Missing shasum with sha512 support, please install it"
(node --version > /dev/null 2>&1) || fail "Missing node.js, please see https://nodejs.org/"
(npm --version > /dev/null 2>&1) || fail "Missing npm, please see https://npmjs.com/"
(jq --version > /dev/null 2>&1) || fail "Missing jq, please see https://stedolan.github.io/jq/"
(glibc-check > /dev/null 2>&1) || fail "Missing glibc-check, install with 'go install github.com/guseggert/glibc-check/cmd/glibc-check@latest'"
if [ "$failed" = true ]; then
exit 1
fi
echo "Starting npm ci (deterministic install)"
exec npm ci --prefer-offline --no-audit --progress=false