You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
754 B
Bash

#!/bin/sh
set -euo pipefail
if (! [ -e netoolclient/src/netoolclient/resources/apidetails.csv ]) || (! [ -e netoolclient/src/netoolclient/resources/apicert.crt ]); then
echo "Downloading firmware for device..."
./download-fw.sh
echo "Extracting firmware..."
./extract.sh $(cat fwname)
DIR=./firmware/www/tool/
echo "tool_directory: $DIR
app_config_directory: netoolclient/src/netoolclient/resources" > config.yml
echo "Extracting certificate..."
cp ./firmware/etc/*.crt netoolclient/src/netoolclient/resources/apicert.crt
echo "Extracting API keys..."
python get_codes.py > /dev/null
echo "Cleaning up..."
./cleanup.sh > /dev/null
echo "API client is setup."
else
echo "Already setup."
fi