-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change os version scheme --------- Co-authored-by: Nathaniel van Diepen <[email protected]>
- Loading branch information
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
pkgnames=(kernelctl) | ||
pkgdesc="Manage aftermarket kernels" | ||
url=https://toltec-dev.org/ | ||
pkgver=0.1-7 | ||
pkgver=0.2-1 | ||
timestamp=2022-11-12T00:00Z | ||
section="utils" | ||
maintainer="Salvatore Stella <[email protected]>" | ||
|
@@ -26,15 +26,17 @@ package() { | |
} | ||
|
||
configure() { | ||
if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then | ||
os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf) | ||
if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$os_version")" == "" ]]; then | ||
echo "Creating a backup of the currently running kernel." | ||
kernelctl backup vanilla | ||
fi | ||
} | ||
|
||
preremove() { | ||
if [[ "$(kernelctl show | tail -n 1 | grep "vanilla-$(< /etc/version)")" == "" ]]; then | ||
if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then | ||
os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf) | ||
if [[ "$(kernelctl show | tail -n 1 | grep "vanilla-$os_version")" == "" ]]; then | ||
if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$os_version")" == "" ]]; then | ||
echo "Unable to restore default kernel." | ||
echo "To force removal, you can run the following:" | ||
echo " opkg remove --force-remove kernelctl" | ||
|