added Malcolm

This commit is contained in:
2021-08-06 10:35:01 +02:00
parent f043730066
commit 70f1922e80
751 changed files with 195277 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
ENCODING="utf-8"
[[ "${EXTRACTED_FILE_UPDATE_RULES:-"false"}" == "true" ]] || exit 0
SRC_DIR=${YARA_RULES_SRC_DIR:-"/usr/local/src/signature-base"}
LINK_DIR=${YARA_RULES_DIR:-"/yara-rules"}
if type git >/dev/null 2>&1 && [[ -d "$SRC_DIR" ]] && [[ -d "$LINK_DIR" ]]; then
pushd "$SRC_DIR" >/dev/null 2>&1
git remote update
git fetch --depth 1 origin
git reset --hard origin
popd >/dev/null 2>&1
rm -f "$LINK_DIR"/*.yar
ln -v -f -s -r "$YARA_RULES_SRC_DIR"/yara/*.yar "$YARA_RULES_SRC_DIR"/vendor/yara/*.yar "$LINK_DIR"/
else
exit 1
fi