Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit 40b2f90

Browse files
committed
check for dependencies
1 parent ead1c04 commit 40b2f90

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

_scripts/make-dist.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
#!/bin/bash
22

3+
echo "checking for dependencies"
4+
5+
DEPENDENCIES=$(cat <<EOF
6+
curl
7+
jq
8+
pip
9+
tar
10+
zip
11+
EOF
12+
)
13+
14+
for dep in $DEPENDENCIES; do
15+
dep_path=`command -v $dep`
16+
if [[ $dep_path ]]; then
17+
echo "requirement '$dep' found ($dep_path). ok"
18+
else
19+
echo "requirement '$dep' not found. aborting"
20+
exit 1
21+
fi
22+
done
23+
24+
# fail on any error
25+
set -e
26+
327
CWD=`pwd`
428
SOURCE_PATH=${CWD}/src
529
DIST_PATH=${CWD}/dist
@@ -98,6 +122,6 @@ cp -Rv $SOURCE_PATH/templates/. $TEMPLATES_PATH
98122

99123
# cleanup
100124
echo "removing temp files"
101-
rm -rvf $TEMP_PATH
125+
rm -rf $TEMP_PATH
102126

103127
cd $CWD

0 commit comments

Comments
 (0)