summaryrefslogtreecommitdiffstats
path: root/bin/update
diff options
context:
space:
mode:
authorSalvatore Bonaccorso <carnil@debian.org>2017-12-29 06:46:46 +0000
committerSalvatore Bonaccorso <carnil@debian.org>2017-12-29 06:46:46 +0000
commitc5709c1a939f21377a63c24615d9060da3ec3345 (patch)
tree04364fdef7cfbe73d3054799b45b86736bf72992 /bin/update
parente373bc038e0b4f230d9c761c6bd6a24c5c7cfd77 (diff)
bin/update: Run commands from BASEDIR where update script was called
Reasoning: The script is used for the automatic updates of the CVE list. This allows to call the script in the sectracker controlled path but working on the CVE list in a workdirectory. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@59009 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/update')
-rwxr-xr-xbin/update5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/update b/bin/update
index 1c8d47f3a7..b47da851ac 100755
--- a/bin/update
+++ b/bin/update
@@ -1,6 +1,9 @@
#!/bin/sh
set -e
+SCRIPT=$(readlink -f "$0")
+BASEDIR=$(dirname "$SCRIPT")
+
if [ ! -d CVE ]; then
echo "run in data subdirectory" >&2
exit 1
@@ -15,5 +18,5 @@ rm -f allitems.html
# capath=/etc/ssl/ca-global
curl -s -o allitems.html.gz https://cve.mitre.org/data/downloads/allitems.html.gz
gunzip allitems.html.gz
-../../bin/updatelist allitems.html ../DSA/list ../DTSA/list ../DLA/list list > list.new
+$BASEDIR/updatelist allitems.html ../DSA/list ../DTSA/list ../DLA/list list > list.new
mv -f list.new list

© 2014-2024 Faster IT GmbH | imprint | privacy policy