#!/usr/bin/env bash SCRIPT=$(readlink -f "$0") SCRIPTPATH=$(dirname "$SCRIPT") for c in python git; do if ! command -v ${c} &>/dev/null; then echo "$command ${c} could not be found" exit 1 fi done cd /tmp git clone --depth 1 https://github.com/Orange-Cyberdefense/arsenal echo -e "title: Commands for Fast Memo Shell from Arsenal\ncommands:" >"${SCRIPTPATH}/commands.yaml" find arsenal/arsenal/data/cheats/ -iname '*.md' ! -name 'README.md' -exec ${SCRIPTPATH}/arsenal_parser.py {} \; >>"${SCRIPTPATH}/commands.yaml" rm -rf /tmp/arsenal