summaryrefslogtreecommitdiff
path: root/src/stage3/prepare_chroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/stage3/prepare_chroot.sh')
-rw-r--r--src/stage3/prepare_chroot.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/stage3/prepare_chroot.sh b/src/stage3/prepare_chroot.sh
index 354917b..61fd1ba 100644
--- a/src/stage3/prepare_chroot.sh
+++ b/src/stage3/prepare_chroot.sh
@@ -94,11 +94,14 @@ librechroot \
# produce a patched libremakepkg to update config.sub/config.guess where needed
cat $(which libremakepkg) > "$_builddir"/libremakepkg-$CARCH.sh
-sed -i '/Boring\/mundane/i \
+chmod +x "$_builddir"/libremakepkg-$CARCH.sh
+
+if [ "x${REGEN_CONFIG_FRAGMENTS:-no}" == "xyes" ]; then
+ sed -i '/Boring\/mundane/i \
update_config_fragments() {\
local url="https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain"\
find $1/build -iname config.sub -print -exec curl "$url;f=config.sub;hb=HEAD" -o {} \\;\
find $1/build -iname config.guess -print -exec curl "$url;f=config.guess;hb=HEAD" -o {} \\;\
}\
hook_pre_build+=(update_config_fragments)' "$_builddir"/libremakepkg-$CARCH.sh
-
+fi