Skip to content

Instantly share code, notes, and snippets.

@Miouyouyou
Forked from RichNeese/gist:52133a14cd0d85839f1200f8831a28f2
Last active October 2, 2020 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Miouyouyou/72f520388c5450679512510c8fd5c627 to your computer and use it in GitHub Desktop.
Save Miouyouyou/72f520388c5450679512510c8fd5c627 to your computer and use it in GitHub Desktop.
install_deb_chroot_desktop()
{
local package=$1
local name
name=$(basename "${package}")
local apt_install_flags=""
for flag in ${DESKTOP_APT_FLAGS_SELECTED}; do
apt_install_flags+=" --install-${flag}"
done
[[ ! -f "${SDCARD}/root/${name}" ]] && cp "${package}" "${SDCARD}/root/${name}"
display_alert "Installing" "$name"
[[ $NO_APT_CACHER != yes ]] && local apt_extra="-o Acquire::http::Proxy=\"http://${APT_PROXY_ADDR:-localhost:3142}\" -o Acquire::http::Proxy::localhost=\"DIRECT\""
LC_ALL=C LANG=C chroot "${SDCARD}" /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt -yqq \
$apt_extra install ${apt_install_flags} ./root/$name" >> "${DEST}"/debug/install.log 2>&1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment