mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
Testing update checksum check
This commit is contained in:
parent
8b9b1439b3
commit
2ad2825c46
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
@ -87,12 +87,16 @@ jobs:
|
|||||||
#qemu-img convert -O vmdk arpl.img arpl.vmdk
|
#qemu-img convert -O vmdk arpl.img arpl.vmdk
|
||||||
qemu-img convert -O vmdk -o adapter_type=lsilogic arpl.img -o subformat=monolithicFlat arpl.vmdk
|
qemu-img convert -O vmdk -o adapter_type=lsilogic arpl.img -o subformat=monolithicFlat arpl.vmdk
|
||||||
|
|
||||||
# Zip image
|
# Zip image and generate checksum
|
||||||
- name: Pack
|
- name: Pack
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
zip -9 "arpl-${{ steps.build.outputs.VERSION }}.img.zip" arpl.img
|
zip -9 "arpl-${{ steps.build.outputs.VERSION }}.img.zip" arpl.img
|
||||||
zip -9 "arpl-${{ steps.build.outputs.VERSION }}.vmdk.zip" arpl*.vmdk
|
zip -9 "arpl-${{ steps.build.outputs.VERSION }}.vmdk.zip" arpl*.vmdk
|
||||||
|
sha256sum .buildroot/output/images/bzImage .buildroot/output/images/rootfs.cpio.xz \
|
||||||
|
"arpl-${{ steps.build.outputs.VERSION }}.img.zip" "arpl-${{ steps.build.outputs.VERSION }}.vmdk.zip" \
|
||||||
|
> sha256sum
|
||||||
|
|
||||||
|
|
||||||
# Upload artifact
|
# Upload artifact
|
||||||
- name: Upload
|
- name: Upload
|
||||||
@ -114,3 +118,4 @@ jobs:
|
|||||||
arpl-${{ steps.build.outputs.VERSION }}.vmdk.zip
|
arpl-${{ steps.build.outputs.VERSION }}.vmdk.zip
|
||||||
.buildroot/output/images/bzImage
|
.buildroot/output/images/bzImage
|
||||||
.buildroot/output/images/rootfs.cpio.xz
|
.buildroot/output/images/rootfs.cpio.xz
|
||||||
|
sha256sum
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
ARPL_VERSION="0.4-alpha8"
|
ARPL_VERSION="0.4-alpha9"
|
||||||
|
|
||||||
# Define paths
|
# Define paths
|
||||||
TMP_PATH="/tmp"
|
TMP_PATH="/tmp"
|
||||||
|
@ -797,6 +797,13 @@ function updateMenu() {
|
|||||||
fi
|
fi
|
||||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||||
--infobox "Downloading last version ${TAG}" 0 0
|
--infobox "Downloading last version ${TAG}" 0 0
|
||||||
|
# Download checksum
|
||||||
|
STATUS=`curl --insecure -s -w "%{http_code}" -L "https://github.com/fbelavenuto/arpl/releases/download/${TAG}/sha256sum" -o /tmp/sha256sum`
|
||||||
|
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
|
||||||
|
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||||
|
--msgbox "Error downloading checksums" 0 0
|
||||||
|
continue
|
||||||
|
fi
|
||||||
STATUS=`curl --insecure -s -w "%{http_code}" -L "https://github.com/fbelavenuto/arpl/releases/download/${TAG}/bzImage" -o /tmp/bzImage`
|
STATUS=`curl --insecure -s -w "%{http_code}" -L "https://github.com/fbelavenuto/arpl/releases/download/${TAG}/bzImage" -o /tmp/bzImage`
|
||||||
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
|
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
|
||||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||||
@ -811,6 +818,12 @@ function updateMenu() {
|
|||||||
fi
|
fi
|
||||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||||
--infobox "Installing new files" 0 0
|
--infobox "Installing new files" 0 0
|
||||||
|
(cd /tmp && sha256sum -c sha256sum)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||||
|
--msgbox "Checksum do not match!" 0 0
|
||||||
|
continue
|
||||||
|
fi
|
||||||
mv /tmp/bzImage "${ARPL_BZIMAGE_FILE}"
|
mv /tmp/bzImage "${ARPL_BZIMAGE_FILE}"
|
||||||
mv /tmp/rootfs.cpio.xz "${ARPL_RAMDISK_FILE}"
|
mv /tmp/rootfs.cpio.xz "${ARPL_RAMDISK_FILE}"
|
||||||
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user