Skip to content

Commit

Permalink
Merge branch 'testing' into actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems authored Sep 12, 2024
2 parents 7d0b287 + f8430da commit 94a4c97
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
9 changes: 6 additions & 3 deletions package/kernelctl/kernelctl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ bl="\033[1;34m" # blue
# change our working directory to / to ease filesystem operations
cd /

# find current os version
os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf)

help() {
read -r -d '' msg <<- EOM
Usage: $(basename "$0") COMMAND
Expand All @@ -36,7 +39,7 @@ help() {
# backup current kernel
backup() {
if [[ "$1" = "vanilla" ]]; then
kernel_name="vanilla-$(< /etc/version)"
kernel_name="vanilla-$os_version"
else
kernel_name=$1
fi
Expand Down Expand Up @@ -82,7 +85,7 @@ to_kernel_name() {
echo "${kernel_names[$(($1 - 1))]}"
return
elif [[ "$1" = "default" ]]; then
ker="vanilla-$(< /etc/version)"
ker="vanilla-$os_version"
else
ker="$1"
fi
Expand Down Expand Up @@ -185,7 +188,7 @@ prune() {
echo -n "Do you want to proceed? [N/y]: "
read -r ans
if [[ "$ans" = "y" || "$ans" = "Y" ]]; then
mapfile -t filenames < <(find "$kernelctl_dir" -path "*vanilla-*.tar.bz2" ! -name vanilla-"$(< /etc/version)".tar.bz2)
mapfile -t filenames < <(find "$kernelctl_dir" -path "*vanilla-*.tar.bz2" ! -name vanilla-"$os_version".tar.bz2)
for filename in "${filenames[@]}"; do
rm "$filename"
done
Expand Down
10 changes: 6 additions & 4 deletions package/kernelctl/package
Original file line number Diff line number Diff line change
Expand Up @@ -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]>"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion package/signature-rm/package
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ archs=(rmallos2 rmallos3)
pkgnames=("signature-rm")
pkgdesc="Remove the signature from the bottom of emails"
url="https://github.com/rM-self-serve/signature-rM"
pkgver=1.0.2-2
pkgver=1.0.2-3
timestamp=2023-12-06T11:43:00Z
section="utils"
maintainer="rM-self-serve <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion package/toltec-base/package
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ archs=(rmall rmallos2 rmallos3 rm1 rm1os2 rm1os3 rm2 rm2os2 rm2os3)
pkgnames=(toltec-base)
pkgdesc="Metapackage defining the base set of packages in a Toltec install"
url=https://toltec-dev.org/
pkgver=1.4-1
pkgver=1.4-2
timestamp=2023-12-27T08:30Z
section="utils"
maintainer="Eeems <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion package/toltec-deletions/package
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ archs=(rm1os2 rm1os3 rm2os2 rm2os3)
pkgnames=(toltec-deletions)
pkgdesc="Metapackage to handle package deletions between OS versions"
url=https://toltec-dev.org/
pkgver=0.1-7
pkgver=0.1-8
timestamp=2023-12-03T04:51:58Z
section="utils"
maintainer="Eeems <[email protected]>"
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==23.7.0
black==24.8.0
certifi==2023.7.22
idna==3.4
isort==5.12.0
Expand All @@ -8,7 +8,7 @@ mypy-extensions==1.0.0
mypy==1.7.1
pylint==3.0.3
six==1.16.0
toltecmk==0.3.2
toltecmk==0.3.3
toml==0.10.2
types-python-dateutil==2.8.19.14
types-requests==2.31.0.2
Expand Down

0 comments on commit 94a4c97

Please sign in to comment.