Skip to content

Commit

Permalink
add readme to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
dni committed Oct 31, 2023
1 parent a9aca23 commit 760f884
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions build-webinstaller.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#!/bin/sh
PROJECT_NAME=nostrZapLamp
REPO=https://github.com/lnbits/nostr-zap-lamp/releases/download
INSTALLER_PATH=./hardware-installer/public/firmware/esp32
INSTALLER_PATH=./hardware-installer/public/firmware

git clone https://github.com/lnbits/hardware-installer

cp README.md ./hardware-installer/public/README.md
cp versions.json ./hardware-installer/src/versions.json
cp installer/config.js ./hardware-installer/src/config.js
cp installer/Hero.jsx ./hardware-installer/src/Hero.jsx

sed -i "s/%title%/$PROJECT_NAME/g" ./hardware-installer/index.html

mkdir -p $INSTALLER_PATH
for version in $(jq -r '.versions[]' ./hardware-installer/src/versions.json); do
mkdir -p $INSTALLER_PATH/$version
wget $REPO/$version/$PROJECT_NAME.ino.bin
mv $PROJECT_NAME.ino.bin $INSTALLER_PATH/$version
wget $REPO/$version/$PROJECT_NAME.ino.partitions.bin
mv $PROJECT_NAME.ino.partitions.bin $INSTALLER_PATH/$version
wget $REPO/$version/$PROJECT_NAME.ino.bootloader.bin
mv $PROJECT_NAME.ino.bootloader.bin $INSTALLER_PATH/$version
for device in $(jq -r '.devices[]' ./hardware-installer/src/versions.json); do
for version in $(jq -r '.versions[]' ./hardware-installer/src/versions.json); do
mkdir -p $INSTALLER_PATH/$device/$version
wget $REPO/$version/$PROJECT_NAME.ino.bin
wget $REPO/$version/$PROJECT_NAME.ino.partitions.bin
wget $REPO/$version/$PROJECT_NAME.ino.bootloader.bin
mv $PROJECT_NAME* $INSTALLER_PATH/$device/$version
done
done

0 comments on commit 760f884

Please sign in to comment.