slackbuilds_ponce/python/python-vulndb/do-not-commit-vulndb-to-upstream.diff
Brenton Earl 5dd77495fd
python/python-vulndb: Switch to i586.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2016-12-24 07:33:30 +07:00

44 lines
1 KiB
Diff

--- vulndb-0.0.19.orig/tools/update-db.sh 2016-12-17 22:06:14.959661248 +0000
+++ vulndb-0.0.19/tools/update-db.sh 2016-12-17 22:26:36.641608883 +0000
@@ -1,29 +1,23 @@
#!/usr/bin/env bash
-set -x
+set -xe
#
# Update the database
#
-if [ ! -d "data" ]; then
- git clone https://github.com/vulndb/data.git
+
+if [ ! -d "/tmp/vulndb_data" ]; then
+ git clone https://github.com/vulndb/data.git /tmp/vulndb_data
fi
-cd data
+cd /tmp/vulndb_data
git pull
cd ..
-mkdir -p vulndb/db/
-cp -rf data/db/*.json vulndb/db/
-git add vulndb/db/
-
-# Bump the version numbers
-tools/semver.sh bump patch
-
-cd data
-git rev-parse HEAD > ../vulndb/db-version.txt
-cd ..
+if [ -d "/usr/lib64" ]; then
+ cp -rf /tmp/vulndb_data/db/*.json /usr/lib64/python2.7/site-packages/vulndb/db/
+else
+ cp -rf /tmp/vulndb_data/db/*.json /usr/lib/python2.7/site-packages/vulndb/db/
+fi
-# Push to repo
-git commit vulndb/db/ vulndb/version.txt vulndb/db-version.txt -m 'Updated vulnerability database'
-git push
\ No newline at end of file
+rm -r /tmp/vulndb_data