Skip to content

Commit

Permalink
update pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
UriHerrera committed Jun 13, 2023
1 parent 622451e commit d3f2c17
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
nuts (0.0.9) nitrux; urgency=medium

* Check if ISO exists so it's not downloaded again.

-- Uri Herrera <uri_herrera@nxos.org> Thu, 13 Jun 2023 01:47:00 -0500

nuts (0.0.8) nitrux; urgency=medium

* Revise aria2c command.
Expand Down
14 changes: 10 additions & 4 deletions usr/bin/nuts
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,19 @@ case "$1" in


# -- Download the ISO with aria2c using the BitTorrent protocol.
# -- Check if the ISO already exists so it's not downloaded again.
# -- However, If the ISO file found doesn't match the checksum, it will still cause the utility to exit at a later stage.
# -- 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
if [ -f "$NUTS_DIR_DLS/nitrux.iso" ]; then
puts-info "An ISO file was found, skipping..."
else
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
fi


# -- Verify the checksum of the ISO. Use the checksum from the query file.
Expand Down

0 comments on commit d3f2c17

Please sign in to comment.