-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
extensions: add APA extension #8133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,23 @@ | ||||||||||||||||||||||||||
# Install armbian-common etc. from APA | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
function extension_prepare_config__apa() { | ||||||||||||||||||||||||||
display_alert "Target image will have Armbian Package Archive (APA) enabled by default" "${EXTENSION}" "info" | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
function custom_apt_repo__add_apa() { | ||||||||||||||||||||||||||
run_host_command_logged echo "deb [signed-by=${APT_SIGNING_KEY_FILE}] https://github.armbian.com/apa current main" "|" tee "${SDCARD}"/etc/apt/sources.list.d/armbian-apa.list | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
Comment on lines
+7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix incorrect piping in The literal -function custom_apt_repo__add_apa() {
- run_host_command_logged echo "deb [signed-by=${APT_SIGNING_KEY_FILE}] https://github.armbian.com/apa current main" "|" tee "${SDCARD}"/etc/apt/sources.list.d/armbian-apa.list
-}
+function custom_apt_repo__add_apa() {
+ run_host_command_logged bash -c \
+ "echo 'deb [signed-by=${APT_SIGNING_KEY_FILE}] https://github.armbian.com/apa current main' | \
+ tee '${SDCARD}/etc/apt/sources.list.d/armbian-apa.list'"
+} 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
function post_armbian_repo_customize_image__install_from_apa() { | ||||||||||||||||||||||||||
# do not install armbian recommends for minimal images | ||||||||||||||||||||||||||
[[ "${BUILD_MINIMAL,,}" =~ ^(true|yes)$ ]] && INSTALL_RECOMMENDS="no" || INSTALL_RECOMMENDS="yes" | ||||||||||||||||||||||||||
chroot_sdcard_apt_get --install-recommends=$INSTALL_RECOMMENDS install "armbian-common armbian-bsp" | ||||||||||||||||||||||||||
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Replace Bash-specific If this script is ever run under -[[ "${BUILD_MINIMAL,,}" =~ ^(true|yes)$ ]] && INSTALL_RECOMMENDS="no" || INSTALL_RECOMMENDS="yes"
+case "${BUILD_MINIMAL}" in
+ [Tt][Rr][Uu][Ee]|[Yy][Ee][Ss]) INSTALL_RECOMMENDS="no" ;;
+ *) INSTALL_RECOMMENDS="yes" ;;
+esac 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Comment on lines
+14
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Refresh APT cache and fix package arguments. Before installing from APA, run -function post_armbian_repo_customize_image__install_from_apa() {
- # do not install armbian recommends for minimal images
- [[ ... ]]
- chroot_sdcard_apt_get --install-recommends=$INSTALL_RECOMMENDS install "armbian-common armbian-bsp"
+function post_armbian_repo_customize_image__install_from_apa() {
+ # do not install armbian recommends for minimal images
+ case "${BUILD_MINIMAL}" in ... esac
+
+ # Refresh repository index
+ chroot_sdcard_apt_get update
+
+ # Install core APA packages
+ chroot_sdcard_apt_get --install-recommends="$INSTALL_RECOMMENDS" install armbian-common armbian-bsp
|
||||||||||||||||||||||||||
# install desktop environmnent if requested | ||||||||||||||||||||||||||
case ${DESKTOP_ENVIRONMENT^^} in | ||||||||||||||||||||||||||
XFCE|KDE|GNOME) | ||||||||||||||||||||||||||
display_alert "installing ${DESKTOP_ENVIRONMENT^^} desktop environment" "${EXTENSION}: ${DESKTOP_ENVIRONMENT^^}" "info" | ||||||||||||||||||||||||||
chroot_sdcard_apt_get --install-recommends=yes "armbian-desktop-${DESKTOP_ENVIRONMENT,,}" | ||||||||||||||||||||||||||
;; | ||||||||||||||||||||||||||
Comment on lines
+17
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Correct desktop environment installation command. Similarly, include the -case ${DESKTOP_ENVIRONMENT^^} in
- XFCE|KDE|GNOME)
- display_alert "installing ${DESKTOP_ENVIRONMENT^^} desktop environment" "${EXTENSION}: ${DESKTOP_ENVIRONMENT^^}" "info"
- chroot_sdcard_apt_get --install-recommends=yes "armbian-desktop-${DESKTOP_ENVIRONMENT,,}"
- ;;
-esac
+case "${DESKTOP_ENVIRONMENT}" in
+ [Xx][Ff][Cc][Ee]|[Kk][Dd][Ee]|[Gg][Nn][Oo][Mm][Ee])
+ display_alert "Installing ${DESKTOP_ENVIRONMENT} desktop environment" \
+ "${EXTENSION}: ${DESKTOP_ENVIRONMENT}" "info"
+ chroot_sdcard_apt_get --install-recommends=yes install armbian-desktop-"${DESKTOP_ENVIRONMENT}"
+ ;;
+esac 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||
esac | ||||||||||||||||||||||||||
} |
Uh oh!
There was an error while loading. Please reload this page.