ecaf1143a9
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
24 lines
380 B
Bash
Executable File
24 lines
380 B
Bash
Executable File
#!/bin/bash
|
|
|
|
TARGET=$1
|
|
COMMIT_MSG=$2
|
|
|
|
if [ -z "$TARGET" ]; then
|
|
echo "target required"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$COMMIT_MSG" ]; then
|
|
echo "commit message required"
|
|
exit 1
|
|
fi
|
|
|
|
./vuln-list-update -vuln-list-dir "$VULN_LIST_DIR" -target "$TARGET"
|
|
|
|
cd "$VULN_LIST_DIR" || exit 1
|
|
|
|
if [[ -n $(git status --porcelain) ]]; then
|
|
git add .
|
|
git commit -m "${COMMIT_MSG}"
|
|
git push
|
|
fi |