mirror of
https://github.com/MISP/misp-galaxy.git
synced 2024-11-26 16:57:18 +00:00
Chg [build] dependency check
This commit is contained in:
parent
9bd54378a6
commit
ee834867b7
1 changed files with 7 additions and 10 deletions
|
@ -1,23 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
requirements_path="requirements.txt"
|
requirements_path="requirements.txt"
|
||||||
missing_deps=0
|
|
||||||
|
|
||||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
pip freeze > installed.txt
|
||||||
echo "$line" | grep -F -f - <(pip freeze)
|
diff -u <(sort $requirements_path) <(sort installed.txt)
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Missing or incorrect version: $line"
|
|
||||||
((missing_deps++))
|
|
||||||
fi
|
|
||||||
done < "$requirements_path"
|
|
||||||
|
|
||||||
if [ $missing_deps -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "All dependencies are installed with correct versions."
|
echo "All dependencies are installed with correct versions."
|
||||||
else
|
else
|
||||||
echo "$missing_deps dependencies are missing or have incorrect versions."
|
echo "Dependencies missing or with incorrect versions. Please install all dependencies from $requirements_path into your environment."
|
||||||
|
rm installed.txt # Clean up
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm installed.txt # Clean up
|
||||||
|
|
||||||
python3 generator.py
|
python3 generator.py
|
||||||
cd ./site/ || exit
|
cd ./site/ || exit
|
||||||
mkdocs build
|
mkdocs build
|
||||||
|
|
Loading…
Reference in a new issue