File: update-db.sh

package info (click to toggle)
python-vulndb 0.1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,032 kB
  • sloc: python: 446; sh: 196; makefile: 2
file content (30 lines) | stat: -rwxr-xr-x 480 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env bash

set -x

#
# Update the database
#
if [ ! -d "data" ]; then
  git clone https://github.com/vulndb/data.git
fi

cd data
git pull
cd ..

rm -rf vulndb/db/
mkdir -p vulndb/db/
cp -rf data/db/* 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 ..

# Push to repo
git commit vulndb/db/ vulndb/version.txt vulndb/db-version.txt -m 'Updated vulnerability database'
git push