Skip to content

Commit

Permalink
mv coponents out of usr/bin
Browse files Browse the repository at this point in the history
- we're already downloading these things every time, there's no point in including an outdated version in a package during build time
  • Loading branch information
UriHerrera committed Sep 8, 2023
1 parent 339946d commit 7955b02
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
16 changes: 6 additions & 10 deletions usr/bin/nuts
Expand Up @@ -401,13 +401,11 @@ done

# -- Enter the Matri... I mean, the overlay.
# -- Run nuts-cru to perform the backup and update.
# -- Always download the latest component.
# -- Always download the latest component. The component will remain in the filesystem after using it; however, once the user executes this <operation> again, it will be deleted and re-downloaded.

overlay_ch rm -f /usr/bin/nuts-cru >"$OUTPUT_FILE" 2>&1
overlay_ch axel -o /usr/bin -c -n 10 "https://raw.githubusercontent.com/Nitrux/nuts/$NUTS_BRANCH/usr/bin/nuts-cru" >"$OUTPUT_FILE" 2>&1
overlay_ch axel -o /etc -c -n 10 "https://raw.githubusercontent.com/Nitrux/nuts/$NUTS_BRANCH/etc/nuts.conf" >"$OUTPUT_FILE" 2>&1
overlay_ch find /usr/bin -type f -name "nuts-crr" -exec rm {} \; >"$OUTPUT_FILE" 2>&1
overlay_ch axel -o /usr/bin -c -n 10 "https://raw.githubusercontent.com/Nitrux/nuts/$NUTS_BRANCH/tmp/nuts-cru" >"$OUTPUT_FILE" 2>&1
overlay_ch axel -o /tmp -c -n 10 "https://raw.githubusercontent.com/Nitrux/nuts/$NUTS_BRANCH/tmp/nuts-query.info" >"$OUTPUT_FILE" 2>&1
overlay_ch chmod +x /usr/bin/nuts-cru >"$OUTPUT_FILE" 2>&1
overlay_ch nuts-cru


Expand All @@ -426,12 +424,10 @@ done

# -- Enter the Matri... I mean, the overlay.
# -- Run nuts-crr to perform the restore actions inside the chroot.
# -- Always download the latest component.
# -- Always download the latest component. The component will remain in the filesystem after using it; however, once the user executes this <operation> again, it will be deleted and re-downloaded.

overlay_ch rm -f /usr/bin/nuts-crr >"$OUTPUT_FILE" 2>&1
overlay_ch axel -o /usr/bin -c -n 10 "https://raw.githubusercontent.com/Nitrux/nuts/$NUTS_BRANCH/usr/bin/nuts-crr" >"$OUTPUT_FILE" 2>&1
overlay_ch axel -o /etc -c -n 10 "https://raw.githubusercontent.com/Nitrux/nuts/$NUTS_BRANCH/etc/nuts.conf" >"$OUTPUT_FILE" 2>&1
overlay_ch chmod +x /usr/bin/nuts-crr >"$OUTPUT_FILE" 2>&1
overlay_ch find /usr/bin -type f -name "nuts-crr" -exec rm {} \; >"$OUTPUT_FILE" 2>&1
overlay_ch axel -o /usr/bin -c -n 10 "https://raw.githubusercontent.com/Nitrux/nuts/$NUTS_BRANCH/tmp/nuts-crr" >"$OUTPUT_FILE" 2>&1
overlay_ch nuts-crr


Expand Down
18 changes: 18 additions & 0 deletions usr/bin/nuts-sup
Expand Up @@ -60,6 +60,24 @@ error() {
}


# -- Define the path of the nuts configuration file.

CONFIG_FILE="/etc/nuts.conf"


# -- Load values from configuration file.
# -- Include fix for SC1090 – ShellCheck.

if [[ ! -f $CONFIG_FILE ]]; then
puts_error "$TOOL_NAME configuration file not found!, quitting." 2>&1
exit 1
else
puts_success "Success! $TOOL_NAME configuration file found, continuing..."
# shellcheck source=/dev/null
. "$CONFIG_FILE"
fi


# -- Variables.

OUTPUT_FILE=$(mktemp)
Expand Down

0 comments on commit 7955b02

Please sign in to comment.