main/postmarketos-update-depthcharge-kernel: new aport (MR 3290)

This commit is contained in:
Anton Bambura 2022-07-23 13:02:29 +03:00 committed by Newbyte
parent fca17c6e08
commit d14ca29400
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,19 @@
# Maintainer: Jenneron <jenneron@protonmail.com>
pkgname=postmarketos-update-depthcharge-kernel
pkgver=1
pkgrel=0
pkgdesc="depthcharge kernel updater script for postmarketOS"
url="https://postmarketos.org"
depends="util-linux-misc"
source="update-depthcharge-kernel.sh"
arch="noarch"
license="GPL-3.0-or-later"
package() {
install -Dm755 "$srcdir/update-depthcharge-kernel.sh" \
"$pkgdir/sbin/pmos-update-depthcharge-kernel"
}
sha512sums="
e0348c99d9b13e41718ec2804866cca1b4585ead259450dc09f595092a0497903cb78fa23b8a33a8ac0ba0d1425e4c8b22af7b3bfc1a7292ac3a8a8dbf2a8717 update-depthcharge-kernel.sh
"

View file

@ -0,0 +1,17 @@
#!/bin/sh
# GPL-3.0-or-later
set -e
# Declare used deviceinfo variables to pass shellcheck
deviceinfo_cgpt_kpart=""
# shellcheck disable=SC1091
. /etc/deviceinfo
partition=$(findfs PARTLABEL=pmOS_kernel)
echo "Flashing $deviceinfo_cgpt_kpart to $partition"
dd if="$deviceinfo_cgpt_kpart" of="$partition"
echo "Done."