summaryrefslogtreecommitdiff
path: root/libre/linux-libre-vanilla/linux-libre-vanilla-chromebook.install
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-05-17 17:50:04 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-05-17 17:50:16 +0200
commit586bd02838f7009c00c6c4a588da5300469a5dd4 (patch)
tree98878398b769c007b74d9090b863e9dc6b1b7b34 /libre/linux-libre-vanilla/linux-libre-vanilla-chromebook.install
parent64b92cb119b41736ea6b1c3f500c705525fcb670 (diff)
downloadabslibre-586bd02838f7009c00c6c4a588da5300469a5dd4.tar.gz
abslibre-586bd02838f7009c00c6c4a588da5300469a5dd4.tar.bz2
abslibre-586bd02838f7009c00c6c4a588da5300469a5dd4.zip
libre: linux-libre-vanilla: fix linux-libre-vanilla-chromebook.install path
Without that fix, with libremakepkg we have: ==> Downloading sources... | ==> ERROR: install file (linux-libre-vanilla-chromebook.install) does not exist or is not a regular file. | ==> ERROR: Could not download sources. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/linux-libre-vanilla/linux-libre-vanilla-chromebook.install')
-rw-r--r--libre/linux-libre-vanilla/linux-libre-vanilla-chromebook.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/libre/linux-libre-vanilla/linux-libre-vanilla-chromebook.install b/libre/linux-libre-vanilla/linux-libre-vanilla-chromebook.install
new file mode 100644
index 000000000..54682de7e
--- /dev/null
+++ b/libre/linux-libre-vanilla/linux-libre-vanilla-chromebook.install
@@ -0,0 +1,26 @@
+post_install () {
+ if mountpoint -q /boot; then
+ major=$(mountpoint -d /boot | cut -f 1 -d ':')
+ minor=$(mountpoint -d /boot | cut -f 2 -d ':')
+ else
+ major=$(mountpoint -d / | cut -f 1 -d ':')
+ minor=$(mountpoint -d / | cut -f 2 -d ':')
+ fi
+ device=$(cat /proc/partitions | awk {'if ($1 == "'${major}'" && $2 == "'${minor}'") print $4 '})
+ device="/dev/${device/%2/1}"
+
+ echo "A new kernel version needs to be flashed onto ${device}."
+ echo "Do you want to do this now? [y|N]"
+ read -r shouldwe
+ if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
+ dd if=/boot/vmlinux.kpart of=${device}
+ sync
+ else
+ echo "You can do this later by running:"
+ echo "# dd if=/boot/vmlinux.kpart of=${device}"
+ fi
+}
+
+post_upgrade() {
+ post_install
+}