hiby: r1_patcher: embed hiby_player.sh

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 58ace97a4e021da225207057aa65e9bf00685119
Author: Roman Artiukhin <[email protected]>
Date:   Wed Jan 21 21:15:44 2026 +0200

    hiby: r1_patcher: embed hiby_player.sh
    
    Make it a single-file, self-contained script.
    
    Change-Id: Idb3e375f1f9774c9328288765c7d1c7c1e01e2d3

diff --git a/tools/r1_patcher/hiby_player.sh b/tools/r1_patcher/hiby_player.sh
deleted file mode 100755
index 70aaf2c33b..0000000000
--- a/tools/r1_patcher/hiby_player.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-killall    hiby_player    &>/dev/null
-killall -9 hiby_player    &>/dev/null
-
-killall    bootloader.rb    &>/dev/null
-killall -9 bootloader.rb    &>/dev/null
-
-/usr/bin/bootloader.rb
-sleep 1s
\ No newline at end of file
diff --git a/tools/r1_patcher/r1_patcher.sh b/tools/r1_patcher/r1_patcher.sh
index 43a87c3d58..7d1653310e 100755
--- a/tools/r1_patcher/r1_patcher.sh
+++ b/tools/r1_patcher/r1_patcher.sh
@@ -51,11 +51,23 @@ unsquashfs -f -d "$workingdir_in/rootfs/extracted" "$workingdir_in/rootfs/rootfs
 ################################################################################
 
 # copy 'bootloader'
-cp "$2" "$workingdir_in/rootfs/extracted/usr/bin/bootloader.rb"
-chmod 0755 "$workingdir_in/rootfs/extracted/usr/bin/bootloader.rb"
+bootloader_file="bootloader.rb"
+cp "$2" "$workingdir_in/rootfs/extracted/usr/bin/$bootloader_file"
+chmod 0755 "$workingdir_in/rootfs/extracted/usr/bin/$bootloader_file"
 
-# copy modified 'hibyplayer.sh' script
-cp hiby_player.sh "$workingdir_in/rootfs/extracted/usr/bin/"
+# create modified 'hiby_player.sh' script
+cat << EOF > "$workingdir_in/rootfs/extracted/usr/bin/hiby_player.sh"
+#!/bin/sh
+
+killall    hiby_player    &>/dev/null
+killall -9 hiby_player    &>/dev/null
+
+killall    $bootloader_file    &>/dev/null
+killall -9 $bootloader_file    &>/dev/null
+
+/usr/bin/$bootloader_file
+sleep 1s
+EOF
 chmod 0755 "$workingdir_in/rootfs/extracted/usr/bin/hiby_player.sh"
 
 ################################################################################
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.