summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXorg2022-10-01 11:09:51 +0200
committerXorg2022-10-01 11:09:51 +0200
commit6c4590b3a543368f2925474ab21be7a955245824 (patch)
tree3b7c9b7e99eee41585d16168f38cc5c85707d072
parent8424a3f3d4ace2e537f03709a4381ab300631d90 (diff)
downloadaur-6c4590b3a543368f2925474ab21be7a955245824.tar.gz
Script: do not harcode the path to the root of the ESP
Related to https://aur.archlinux.org/packages/memtest86-efi#comment-850659
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--memtest86-efi21
3 files changed, 15 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d081e578c655..a362c0402232 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = memtest86-efi
pkgdesc = A free, thorough, stand alone memory test as an EFI application
pkgver = 10.0build1000
- pkgrel = 1
+ pkgrel = 2
epoch = 1
url = https://www.memtest86.com
install = memtest86-efi.install
@@ -17,7 +17,7 @@ pkgbase = memtest86-efi
source = memtest86-efi.conf
source = memtest86-efi-update.hook
sha512sums = b08e6cf3cb9448d5ac7fb4ba7c6338d2037caebd16710f4c2897cfe73766d7dfba7a0012b1ec5acbc546932e989c2a82bec1428295ea0bf4702e49d75e5b03e1
- sha512sums = c797ddff498ca4263baf1b9af9d6704619671ea0f39b14e9b0a1c0497974de70bad316be790aa2e37481564333daa0afee19e20ba024ba7413e9d2a4a7772c69
+ sha512sums = 3dca787bb9727779c052cb97e725010ab1092940f6efba56aeca0d998d842ac369fa9db92c60513174b23b921509a94237ae37b59d833bd836c5a4e3cf4897c8
sha512sums = 5eb6231096484d8923fa9943401c5f5e654a498028b3b4c0b19d26c8265fd8882c94ee90dfa23fabcfb1f8d3812e0a502c195d57b4fbdf5cc25f3ac8dcb36759
sha512sums = a8936ed4a1955d69251955b824cfdfc606c374d40509a767ee4e357e746947d5bf1bd6793e5a4224733907556375bee05c0dd27f8044604f136d84c9be365d42
diff --git a/PKGBUILD b/PKGBUILD
index 1b35ab658368..c4a34161aa75 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ _realname=memtest86
pkgname=$_realname-efi
epoch=1
pkgver=10.0build1000
-pkgrel=1
+pkgrel=2
pkgdesc="A free, thorough, stand alone memory test as an EFI application"
arch=('any')
url="https://www.memtest86.com"
@@ -19,7 +19,7 @@ source=("$pkgname-$pkgver.zip::https://github.com/X0rg/AUR-packages/raw/master/f
"memtest86-efi.conf"
"memtest86-efi-update.hook")
sha512sums=('b08e6cf3cb9448d5ac7fb4ba7c6338d2037caebd16710f4c2897cfe73766d7dfba7a0012b1ec5acbc546932e989c2a82bec1428295ea0bf4702e49d75e5b03e1'
- 'c797ddff498ca4263baf1b9af9d6704619671ea0f39b14e9b0a1c0497974de70bad316be790aa2e37481564333daa0afee19e20ba024ba7413e9d2a4a7772c69'
+ '3dca787bb9727779c052cb97e725010ab1092940f6efba56aeca0d998d842ac369fa9db92c60513174b23b921509a94237ae37b59d833bd836c5a4e3cf4897c8'
'5eb6231096484d8923fa9943401c5f5e654a498028b3b4c0b19d26c8265fd8882c94ee90dfa23fabcfb1f8d3812e0a502c195d57b4fbdf5cc25f3ac8dcb36759'
'a8936ed4a1955d69251955b824cfdfc606c374d40509a767ee4e357e746947d5bf1bd6793e5a4224733907556375bee05c0dd27f8044604f136d84c9be365d42')
diff --git a/memtest86-efi b/memtest86-efi
index 0e4c54b16053..3d1daa6cb8a8 100644
--- a/memtest86-efi
+++ b/memtest86-efi
@@ -141,7 +141,7 @@ install() {
# Prompt for destination directory
memtest86_esp_path="/EFI/memtest86"
echo -en "Press Enter if ${CB}$memtest86_esp_path${CR} is the directory where you want to install MemTest86, "
- echo -en "else enter something else (like ${CB}/EFI/tools/memtest86${CR}): "
+ echo -en "else enter something else (e.g. ${CB}/EFI/tools/memtest86${CR}, or ${CB}/${CR} to install on ESP's root): "
memtest86_esp_path=$(promptuser "$memtest86_esp_path")
# Check if ESP is mounted or mount it otherwise
@@ -150,7 +150,7 @@ install() {
# Get user choice
echo "Select $PRGNAME action to perform:"
- echo -e "${CB}1${CR}: Copy shellx64.efi file on ESP's root (bit safe)"
+ echo -e "${CB}1${CR}: Copy shellx64.efi file on ESP at ${CB}$memtest86_esp_path${CR} (bit safe)"
echo -e "${CB}2${CR}: Add a new EFI boot entry (more safe)"
echo -e "${CB}3${CR}: Add a boot entry for GRUB2 menu"
echo -e "${CB}4${CR}: Add a boot entry for systemd-boot menu"
@@ -162,11 +162,11 @@ install() {
done
case $choice in
- 1) # Install MemTest86 in $esp_mount_path/
+ 1) # Install MemTest86 in ${esp_mount_path}${memtest86_esp_path}/
memtest86_esp_bin="shell$ARCH.efi"
- memtest86_esp_path="/"
- [[ -f "$esp_mount_path/$memtest86_esp_bin" ]] && mv -v "$esp_mount_path/$memtest86_esp_bin" "$esp_mount_path/$memtest86_esp_bin.bak" # Backup if exist
- _common_install "$esp_mount_path" "$memtest86_esp_bin"
+ old_esp_bin="${esp_mount_path}${memtest86_esp_path}/$memtest86_esp_bin"
+ [[ -f "$old_esp_bin" ]] && mv -v "$old_esp_bin" "${old_esp_bin}.bak" # Backup if exist
+ _common_install "${esp_mount_path}${memtest86_esp_path}" "$memtest86_esp_bin"
;;
2) # Install MemTest86 in ${esp_mount_path}${memtest86_esp_path}/ & add an EFI boot entry
@@ -260,10 +260,11 @@ remove() {
_mount_esp "$esp_partition" "$esp_mount_path"
case $choice in
- 1) # Remove files in $esp_mount_path/
- echo -e "MemTest86 will be removed from ${CB}$esp_mount_path/${CR}."
- rm -v "$esp_mount_path/$memtest86_esp_bin" "$esp_mount_path/blacklist.cfg" "$esp_mount_path/mt86.png" "$esp_mount_path/unifont.bin"
- [[ -f "$esp_mount_path/$memtest86_esp_bin.bak" ]] && mv -v "$esp_mount_path/$memtest86_esp_bin.bak" "$esp_mount_path/$memtest86_esp_bin"
+ 1) # Remove files in ${esp_mount_path}${memtest86_esp_path}/
+ echo -e "MemTest86 will be removed from ${CB}${esp_mount_path}${memtest86_esp_path}/${CR}."
+ old_esp_bin="${esp_mount_path}${memtest86_esp_path}/$memtest86_esp_bin"
+ rm -v "${esp_mount_path}${memtest86_esp_path}"/{$memtest86_esp_bin,blacklist.cfg,mt86.png,unifont.bin}
+ [[ -f "${old_esp_bin}.bak" ]] && mv -v "${old_esp_bin}.bak" "$old_esp_bin"
;;
2) # Remove files in ${esp_mount_path}${memtest86_esp_path}/ & delete EFI boot entry