WLED/tools/all_xml.sh
Will Miles 1346eb4f76 tools: Add all_xml fetch script
Useful for checking that I haven't broken anything.
2024-09-18 19:47:52 -04:00

18 lines
347 B
Bash

#!/bin/bash
# Pull all settings pages for comparison
HOST=$1
TGT_PATH=$2
CURL_ARGS="--compressed"
# Replicate one target many times
function replicate() {
for i in {0..10}
do
echo -n " http://${HOST}/settings.js?p=$i -o ${TGT_PATH}/$i.xml"
done
}
read -a TARGETS <<< $(replicate)
mkdir -p ${TGT_PATH}
curl ${CURL_ARGS} ${TARGETS[@]}