#!/bin/sh set -euo pipefail if (! [ -e apidetails.csv ]) || (! [ -e 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: ." > config.yml 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