pika-kernel-manager/data/scripts/get_kernel_pika.sh

11 lines
455 B
Bash
Raw Normal View History

2024-08-31 07:46:24 +02:00
#! /bin/bash
2024-09-01 09:10:07 +02:00
if [[ "$1" == "version" ]]
then
apt show kernel-pika 2>&1 | grep -v "does not have a stable" | grep Depends: | head -n1 | cut -f2 -d":" | cut -f1 -d"," | cut -f3 -d"-" | tr -d ' '
elif [[ "$1" == "list" ]]
then
apt list 2>&1 | cut -f1 -d'/' | grep -v dbg | grep -E "linux-image-.*-pikaos" | cut -f3- -d"-" | tr -d ' '
else
apt show kernel-pika 2>&1 | grep Depends: | tr "," "\n" | cut -f2 -d":" | grep linux-image | tr -d ' '
fi