Commit ec3166c0 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Add kernel sources install

parent cb8665d0
...@@ -163,6 +163,25 @@ function jobs () ...@@ -163,6 +163,25 @@ function jobs ()
#
# Install kernel source
#
"Source" )
if ! is_package_manager_running; then
if [[ -n $(dpkg -l | grep $SOURCE_PKG) ]]; then
debconf-apt-progress -- apt-get -y purge ${SOURCE_PKG}
# cleanup
debconf-apt-progress -- apt -y autoremove
else
debconf-apt-progress -- apt-get -y install ${SOURCE_PKG}
dialog --colors --backtitle "$BACKTITLE" --no-collapse --title " Kernel source " --clear --msgbox "\nYou will find compressed kernel source and configuration in /usr/src" 7 72
fi
fi
;;
# Toggle mini and full firmware # Toggle mini and full firmware
# #
"Full"|"Mini" ) "Full"|"Mini" )
......
...@@ -324,6 +324,12 @@ while true; do ...@@ -324,6 +324,12 @@ while true; do
if [[ -n $(dpkg -l | grep linux-headers) ]]; then LIST+=( "Headers" "Remove kernel headers" ); else \ if [[ -n $(dpkg -l | grep linux-headers) ]]; then LIST+=( "Headers" "Remove kernel headers" ); else \
LIST+=( "Headers" "Install kernel headers" ); fi LIST+=( "Headers" "Install kernel headers" ); fi
SOURCE_PKG=$(apt-cache --names-only search ^linux-source-* | awk '{ print $1 }' | grep ${BRANCH}-${LINUXFAMILY} | tail -1)
if [[ -n $SOURCE_PKG ]]; then
if [[ -n $(dpkg -l | grep $SOURCE_PKG) ]]; then LIST+=( "Source" "Remove kernel source" ); else \
LIST+=( "Source" "Install kernel source" ); fi
fi
if [[ -f /etc/armbian.txt ]]; then if [[ -f /etc/armbian.txt ]]; then
if [[ -n $(dpkg -l | grep -w "armbian-firmware-full ") ]]; then if [[ -n $(dpkg -l | grep -w "armbian-firmware-full ") ]]; then
LIST+=( "Mini" "Install mini firmware package" ); LIST+=( "Mini" "Install mini firmware package" );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment