]> git.ipfire.org Git - people/stevee/pakfire.git/blob - tools/chroot-shell
ccache optimizations: Use /tmp and enable compression.
[people/stevee/pakfire.git] / 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 for i in ${SOURCE_DIR} /root /; do
20 if [ -d "${i}" ]; then
21 cd ${i}
22 break
23 fi
24 done
25 unset i
26
27 exec /bin/bash --login