pika-kernel-manager/data/scripts/get_kernel_pika.sh
Ward from fusion-voyager-3 4f757eef46
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 1m55s
minor fix up
2025-01-04 20:41:17 +03:00

19 lines
825 B
Bash
Executable File

#! /bin/bash
if [[ "$1" == "list" ]]
then
apt list 2>&1 | cut -f1 -d'/' | grep -v dbg | grep -E "linux-image-.*-pikaos" | cut -f3- -d"-" | tr -d ' '
elif [[ "$1" == "current_version" ]]
then
dpkg -s 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" == "current_pkgname" ]]
then
dpkg -s kernel-pika 2>&1 | grep Depends: | tr "," "\n" | cut -f2 -d":" | grep linux-image | tr -d ' '
elif [[ "$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" == "pkgname" ]]
then
apt show kernel-pika 2>&1 | grep Depends: | tr "," "\n" | cut -f2 -d":" | grep linux-image | tr -d ' '
fi