latest file should only have one line, and version needs to be in the update
This commit is contained in:
parent
35d062baaa
commit
88dacd58f4
1 changed files with 2 additions and 2 deletions
|
|
@ -7,13 +7,13 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
tar -czf firmware_update/firmware.tar.gz main.py uota.cfg
|
||||
tar -czf firmware_update/firmware.tar.gz main.py uota.cfg version
|
||||
checksum=$(sha256sum firmware_update/firmware.tar.gz | cut -d ' ' -f 1)
|
||||
|
||||
# write new line into firmware_update/latest file
|
||||
# example line:
|
||||
# 2.0.1;firmware.tar.gz;0;8870f8b3bd8b54437f0a7f721cd3f3fe208e60638dcf36a9f4efe31dab58c548
|
||||
echo "$1;firmware.tar.gz;0;$checksum" >> firmware_update/latest
|
||||
echo "$1;firmware.tar.gz;0;$checksum" > firmware_update/latest
|
||||
|
||||
echo "new latest file:"
|
||||
cat firmware_update/latest
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue