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.
24 lines
519 B
Bash
24 lines
519 B
Bash
4 months ago
|
#!/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
|