]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - pkgs/core/build-essentials/buildsystem-tools/chroot-shell
0d4a61f20771dff6dc6a8578c52985f022fe2c79
[people/ms/ipfire-3.x.git] / pkgs / core / build-essentials / buildsystem-tools / chroot-shell
1 #!/bin/bash
2
3 cat <<EOF
4
5 You are now dropped to a chrooted shell of the package's environment.
6
7 The sources have been extracted to /build and maybe there are files left
8 from a last (broken) build. Nothing of that content will be saved after
9 you left the shell.
10
11 You can leave the environment by typing "exit" or Ctrl-D.
12
13 EOF
14
15 # Setting nice environment
16 export PS1="pakfire-chroot \w> "
17
18 # Change to directory the user will most likely work in
19 if [ -z "${SOURCE_DIR}" ]; then
20 SOURCE_DIR="/build"
21 fi
22 cd "${SOURCE_DIR}"
23
24 exec /bin/bash --login