-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash.sh
More file actions
executable file
·37 lines (30 loc) · 795 Bytes
/
bash.sh
File metadata and controls
executable file
·37 lines (30 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# See LICENSE for license details.
#!/bin/bash
set -euo pipefail
unpack_src() {
tar xf bash-5.1.tar.gz
cd bash-5.1
return
}
configure() {
sed -i '/^bashline.o:.*shmbchar.h/a bashline.o: ${DEFDIR}/builtext.h' Makefile.in
./configure --prefix=/usr \
--docdir=/usr/share/doc/bash-5.1 \
--without-bash-malloc \
--with-installed-readline
return
}
make_install() {
make
chown -Rv tester .
su tester -c "PATH=$PATH make tests < $(tty)"
make DESTDIR=$TODD_FAKE_ROOT_DIR -j1 install
return
}
post_install() {
mkdir $TODD_FAKE_ROOT_DIR/bin
mv $TODD_FAKE_ROOT_DIR/usr/bin/bash $TODD_FAKE_ROOT_DIR/bin/bash
ln -sv bash $TODD_FAKE_ROOT_DIR/bin/sh
return
}
unpack_src && configure && make_install && post_install