1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00
gocsaf/docs/scripts/testDownloader.sh

57 lines
1.3 KiB
Bash
Executable file

#!/usr/bin/env bash
# This file is Free Software under the MIT License
# without warranty, see README.md and LICENSES/MIT.txt for details.
#
# SPDX-License-Identifier: MIT
#
# SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
# Software-Engineering: 2022 Intevation GmbH <https://intevation.de>
set -e # to exit if a command in the script fails
cd ~/csaf_distribution
echo
echo '==== run downloader (1): find pmd, command line'
rm -r -f ~/downloaded1
mkdir ~/downloaded1
./bin-linux-amd64/csaf_downloader --directory ../downloaded1 \
--rate 4.1 --verbose --insecure localhost
echo
echo '==== this was downloaded (1)'
pushd ~/downloaded1
find .
popd
echo
echo '==== run downloader (2): direct url, command line'
rm -r -f ~/downloaded2
mkdir ~/downloaded2
./bin-linux-amd64/csaf_downloader --directory ../downloaded2 \
--verbose --insecure https://localhost:9443/.well-known/csaf-aggregator/local-dev-provider2/provider-metadata.json
echo
echo '==== this was downloaded (2)'
pushd ~/downloaded2
find .
popd
echo
echo '==== run downloader (3): find pmd, config file'
rm -r -f ~/downloaded3
mkdir ~/downloaded3
./bin-linux-amd64/csaf_downloader -c "docs/scriptsdownloader_test.toml" localhost
echo
echo '==== this was downloaded (3)'
pushd ~/downloaded3
find .
popd