makedeb


ventoy-bin 1.0.99-0


An utility to directly boot image files without reformating the USB

Click here to go back to the commit logs for ventoy-bin.

Commit:


Hash: 1626436179ee4433e0d9b78e344c4129cf43539f

Message: add `/usr/bin/ventoy-persistent` script

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 30dc6ed..609dfc9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
 pkgbase = ventoy-bin
 	pkgdesc = A new multiboot USB solution (Binary)
 	pkgver = 1.0.39
-	pkgrel = 1
+	pkgrel = 2
 	url = http://www.ventoy.net/
+	install = ventoy.install
 	arch = i686
 	arch = x86_64
 	license = GPL3
@@ -17,10 +18,12 @@ pkgbase = ventoy-bin
 	source = https://github.com/ventoy/Ventoy/releases/download/v1.0.39/ventoy-1.0.39-linux.tar.gz
 	source = ventoy
 	source = ventoyweb
+	source = ventoy-persistent
 	source = sanitize.patch
 	sha256sums = 56df6024bff1dbf3176171bf16f16dc2ad49b1a5a672404fc978a04f4962aa8f
 	sha256sums = 1ad5d314e02b84127a5a59f3871eb1d28617218cad07cde3eeddcac391473000
 	sha256sums = c3d4463a878a89d96e5f0bc4e1a43e48f27af5965bd4c977567695d7cf91fe5f
+	sha256sums = 5db7c99377d75a9c4cb541e1455383396ec6dc6746f7b8dbed5d2b96ea1867e0
 	sha256sums = d250816de0903a5fc5364ee25914a06b1b1595bcfc72dac84ad016e1d30727c4
 
 pkgname = ventoy-bin
diff --git a/.gitignore b/.gitignore
index 947bfc9..c1eabfb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,6 @@
 !.SRCINFO
 !ventoy
 !ventoyweb
+!ventoy-persistent
 !sanitize.patch
+!ventoy.install
diff --git a/PKGBUILD b/PKGBUILD
index 79b61f7..11aa3a7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 
 pkgname=ventoy-bin
 pkgver=1.0.39
-pkgrel=1
+pkgrel=2
 pkgdesc='A new multiboot USB solution (Binary)'
 url='http://www.ventoy.net/'
 arch=('i686' 'x86_64')
@@ -12,11 +12,13 @@ license=('GPL3')
 depends=('bash' 'util-linux' 'xz' 'exfat-utils' 'dosfstools' 'lib32-glibc')
 provides=("${pkgname%-bin}")
 conflicts=("${pkgname%-bin}")
+install="${pkgname%-bin}.install"
 source=("https://github.com/ventoy/Ventoy/releases/download/v${pkgver}/${pkgname%-bin}-${pkgver}-linux.tar.gz"
-        "${pkgname%-bin}" "${pkgname%-bin}web" 'sanitize.patch')
+        "${pkgname%-bin}" "${pkgname%-bin}web" "${pkgname%-bin}-persistent" 'sanitize.patch')
 sha256sums=('56df6024bff1dbf3176171bf16f16dc2ad49b1a5a672404fc978a04f4962aa8f'
             '1ad5d314e02b84127a5a59f3871eb1d28617218cad07cde3eeddcac391473000'
             'c3d4463a878a89d96e5f0bc4e1a43e48f27af5965bd4c977567695d7cf91fe5f'
+            '5db7c99377d75a9c4cb541e1455383396ec6dc6746f7b8dbed5d2b96ea1867e0'
             'd250816de0903a5fc5364ee25914a06b1b1595bcfc72dac84ad016e1d30727c4')
 
 prepare() {
@@ -58,5 +60,5 @@ package() {
   done
 
   msg2 "Creating /usr/bin entries..."
-  install -Dm755 "$srcdir/${pkgname%-bin}"{,web} -vt "$pkgdir"/usr/bin/
+  install -Dm755 "$srcdir/${pkgname%-bin}"{,web,-persistent} -vt "$pkgdir"/usr/bin/
 }
diff --git a/ventoy-persistent b/ventoy-persistent
new file mode 100755
index 0000000..5820297
--- /dev/null
+++ b/ventoy-persistent
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd /opt/ventoy || exit 1
+exec ./CreatePersistentImg.sh "$@"
diff --git a/ventoy.install b/ventoy.install
new file mode 100644
index 0000000..0966cf8
--- /dev/null
+++ b/ventoy.install
@@ -0,0 +1,12 @@
+post_install() {
+  printf "$(tput setaf 4)  ->$(tput sgr0; tput bold) %s$(tput sgr0)\n" \
+    'NOTE: You can create persistence images for ventoy with the "ventoy-persistent" command,'
+  printf "$(tput setaf 4)  ->$(tput sgr0; tput bold) %s$(tput sgr0)\n" \
+    'which is a shortcut to "/opt/ventoy/CreatePersistentImg.sh"'
+  printf "$(tput setaf 4)  ->$(tput sgr0; tput bold) %s$(tput sgr0)\n" \
+    '(See https://www.ventoy.net/en/plugin_persistence.html for documentation.)'
+}
+
+post_upgrade() {
+  [ $(vercmp $2 1.0.39) -le 0 ] && post_install
+}