pika-kernel-manager/data/scripts/get_kernel_pika.sh
Ward from fusion-voyager-3 b464a7b24f
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 2m15s
Dynamically find kernels
2024-09-01 10:10:07 +03:00

11 lines
455 B
Bash
Executable File

#! /bin/bash
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