aboutsummaryrefslogtreecommitdiff
path: root/extra/bash/build
diff options
context:
space:
mode:
Diffstat (limited to 'extra/bash/build')
-rwxr-xr-xextra/bash/build12
1 files changed, 10 insertions, 2 deletions
diff --git a/extra/bash/build b/extra/bash/build
index 26def78c..ff66c110 100755
--- a/extra/bash/build
+++ b/extra/bash/build
@@ -1,7 +1,9 @@
#!/bin/sh -e
-for patch in bash51-0??; do
- patch -p0 < "$patch"
+bash_maj=${2%%.*}
+bash_min=${2%.p*} bash_min=${bash_min#"$bash_maj."}
+for patch in "bash$bash_maj$bash_min-"0??; do
+ [ -f "$patch" ] && patch -p0 < "$patch"
done
./configure \
@@ -15,3 +17,9 @@ make
make DESTDIR="$1" install
ln -s bash "$1/usr/bin/sh"
+
+# Remove bash C header files. I couldn't find an actual example of how these
+# can be useful to someone. If you can think of one, and do need it, send me a
+# mail and I will think about adding them back if it makes sense to me.
+# Otherwise, you can remove this part through a hook or a fork.
+rm -rf "$1/usr/include"