Skip to content

Commit

Permalink
😆 ofc it didn't work; fix comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
UriHerrera committed Jun 13, 2023
1 parent 754cb22 commit ee330bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
nuts (0.0.7) nitrux; urgency=medium

* Fix ISO comparison.
* Revise aria2c command.
* Revise axel command.

-- Uri Herrera <uri_herrera@nxos.org> Mon, 12 Jun 2023 22:34:00 -0500

nuts (0.0.6) nitrux; urgency=medium

* Fix chroot messages, download aria2 when using versions of the distribution without it.
Expand Down
11 changes: 5 additions & 6 deletions usr/bin/nuts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fi

# -- Functions.

dl_file () { axel -a -o /tmp -n 10 "$@"; }
dl_file () { axel -o /tmp -n 10 "$@"; }
overlay_ch () { $ROOT overlayroot-chroot; }


Expand Down Expand Up @@ -275,7 +275,7 @@ case "$1" in
-e /media/* \
-e /run/* \
-e /sys/* \
-e /tmp/* \
-e //tmp/* \
-e /var/{cache,lib,local,lock,log,mail,opt,run,spool,tmp}/ \
-comp zstd \
-Xcompression-level 22 \
Expand Down Expand Up @@ -307,17 +307,16 @@ case "$1" in
# -- Use the magnet link from the query file.
# -- Magnet link is provided by FOSS Torrents https://fosstorrents.com/distributions/nitrux/#downloads.

puts-info "Dowloading ISO using aria2c, continuing..."
MAGNET_LINK="$(tail /tmp/nuts-query.info | grep magnetlink= | rev | cut -d '=' -f -42 | rev)"

$ROOT aria2c -d "$NUTS_DIR_DLS" --seed-time=0 "$MAGNET_LINK"
$ROOT mv "$NUTS_DIR_DLS"/nitrux-nx-desktop-plasma-*-amd64.iso "$NUTS_DIR_DLS"/nitrux.iso
$ROOT aria2c -d "$NUTS_DIR_DLS" -o nitrux.iso --seed-time=0 "$MAGNET_LINK"


# -- Verify the checksum of the ISO. Use the checksum from the query file.
# -- Exit if checksum doesn't match.

LOCAL_ISO_SUM="$(md5sum "$NUTS_DIR_DLS"/nitrux.iso | cut -c -32)"
DL_ISO_SUM="$(tail /tmp/nuts-query.info | grep rootlistsum= | cut -c -44 | rev | cut -c -32 | rev)"
DL_ISO_SUM="$(tail /tmp/nuts-query.info | grep isosum= | cut -c -44 | rev | cut -c -32 | rev)"

if [ "$LOCAL_ISO_SUM" == "$DL_ISO_SUM" ]; then
puts-info "ISO checksum matches, continuing..."
Expand Down

0 comments on commit ee330bf

Please sign in to comment.