diff options
author | Salvatore Bonaccorso <carnil@debian.org> | 2017-12-29 06:46:46 +0000 |
---|---|---|
committer | Salvatore Bonaccorso <carnil@debian.org> | 2017-12-29 06:46:46 +0000 |
commit | 766695696c102a6c67856de4d43e3d1bee2b475c (patch) | |
tree | 372e955bdb3e822423ff79d18f7886247438319a /bin/update | |
parent | 19cd587110687e1e47de18918436d32ee58e60c4 (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-x | bin/update | 5 |
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 |