Nimbin[12]?Mirrors & Forks / jhalfs / commits / 87eb9e9

jhalfs git · trunk

jhalfs LFS build automation (mirror)

lfs mirror bash · first commit 2005-09-11 · last commit 2024-02-13 (2 years ago) · synced 3 days ago · upstream: git.linuxfromscratch.org/jhalfs

Python 78.4% Shell 19.8% Makefile 1.8%
git clone https://git.christianimmanuel.de/mirrors-forks/jhalfs.gitwget https://git.christianimmanuel.de/mirrors-forks/jhalfs/archive/jhalfs.tar.gz

Make the kernel filesystem scriptlets executable

Pierre Labastie · 2022-10-06 08:20 · 87eb9e9a946f507b46803e4d1f5508b7ce54c3b2

This is so that they can be run from the main Makefile, instead
of having to edit them to put them inside the Makefile.
 common/kernfs.xsl            | 2 ++
 common/libs/func_book_parser | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/common/kernfs.xsl b/common/kernfs.xsl
index 2f875de..f47f665 100644
--- a/common/kernfs.xsl
+++ b/common/kernfs.xsl
@@ -7,6 +7,8 @@
   <xsl:output method="text"/>
 
   <xsl:template match="/">
+    <xsl:text>#!/bin/bash
+</xsl:text>
     <xsl:apply-templates select="//userinput[contains(string(),'--bind') or
                                              contains(string(),'/proc') or
                                              contains(string(),'readlink') or
diff --git a/common/libs/func_book_parser b/common/libs/func_book_parser
index 229cee0..10115b8 100644
--- a/common/libs/func_book_parser
+++ b/common/libs/func_book_parser
@@ -159,9 +159,11 @@ create_kernfs_scripts() {    #
   xsltproc --nonet \
            -o kernfs-scripts/devices.sh kernfs.xsl \
            $BOOK/*/kernfs.xml >> $LOGDIR/$LOG 2>&1
+  chmod +x kernfs-scripts/devices.sh
   xsltproc --nonet \
            -o kernfs-scripts/teardown.sh kernfs.xsl \
            $BOOK/chapter??/reboot.xml >> $LOGDIR/$LOG 2>&1
+  chmod +x kernfs-scripts/teardown.sh
 
   echo "done"