Skip to content

Commit

Permalink
[ci skip] ....
Browse files Browse the repository at this point in the history
  • Loading branch information
UriHerrera committed Jun 13, 2023
1 parent 56ee4ab commit 63bd170
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions usr/bin/nuts
Original file line number Diff line number Diff line change
Expand Up @@ -348,20 +348,9 @@ for cmd; do
# -- Run nuts-cru to perform the update actions inside the chroot.
# -- If the component doesn't exist in the root, download it.

overlay_ch \
echo ""
TOOL_SHRT_NAME="nuts"
dl_file () { axel -o /tmp -n 10 "$@"; }
puts-info () { printf "$TOOL_SHRT_NAME: \e[34mInfo:\e[0m %b\n\n" "$*"; }
if [ -f "/usr/bin/nuts-cru" ]; then
puts-info "Update component found, continuing..."
nuts-cru
else
puts-info "Update component not found, downloading..."
dl_file https://raw.githubusercontent.com/Nitrux/nuts/main/usr/bin/nuts-cru
chmod +x /tmp//nuts-cru && mv /tmp//nuts-cru /usr/bin/
nuts-cru
fi
overlay_ch dl_file https://raw.githubusercontent.com/Nitrux/nuts/main/usr/bin/nuts-cru
overlay_ch chmod +x /tmp//nuts-cru && mv /tmp//nuts-cru /usr/bin/
overlay_ch nuts-cru


# -- After running rsync reboot the device.
Expand Down Expand Up @@ -393,20 +382,9 @@ for cmd; do
# -- Run nuts-crr to perform the restore actions inside the chroot.
# -- If the component doesn't exist in the root, download it.

overlay_ch \
echo ""
TOOL_SHRT_NAME="nuts"
dl_file () { axel -o /tmp -n 10 "$@"; }
puts-info () { printf "$TOOL_SHRT_NAME: \e[34mInfo:\e[0m %b\n\n" "$*"; }
if [ -f "/usr/bin/nuts-crb" ]; then
puts-info "Restore component found, continuing..."
nuts-crr
else
puts-info "Restore component not found, downloading..."
dl_file https://raw.githubusercontent.com/Nitrux/nuts/main/usr/bin/nuts-crr
chmod +x /tmp//nuts-crr && mv /tmp//nuts-crr /usr/bin/
nuts-crr
fi
overlay_ch dl_file https://raw.githubusercontent.com/Nitrux/nuts/main/usr/bin/nuts-crr
overlay_ch chmod +x /tmp//nuts-crr && mv /tmp//nuts-crr /usr/bin/
overlay_ch nuts-crr


# -- After running rsync reboot the device.
Expand Down

0 comments on commit 63bd170

Please sign in to comment.