OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script installs Debian-derived distributions in a chroot environment. | 7 # This script installs Debian-derived distributions in a chroot environment. |
8 # It can for example be used to have an accurate 32bit build and test | 8 # It can for example be used to have an accurate 32bit build and test |
9 # environment when otherwise working on a 64bit machine. | 9 # environment when otherwise working on a 64bit machine. |
10 # N. B. it is unlikely that this script will ever work on anything other than a | 10 # N. B. it is unlikely that this script will ever work on anything other than a |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 for i in $(list_all_chroots); do | 762 for i in $(list_all_chroots); do |
763 sudo "$i" mkdir -p "${dir}/chroot" | 763 sudo "$i" mkdir -p "${dir}/chroot" |
764 done | 764 done |
765 sudo sed -i "s,${HOME}/chroot,${dir}/chroot,g" /etc/schroot/mount-* | 765 sudo sed -i "s,${HOME}/chroot,${dir}/chroot,g" /etc/schroot/mount-* |
766 break | 766 break |
767 fi | 767 fi |
768 done | 768 done |
769 fi | 769 fi |
770 | 770 |
771 # Clean up package files | 771 # Clean up package files |
772 sudo schroot -c /usr/local/bin/"${target%bit}" -p -- apt-get clean | 772 sudo schroot -c "${target%bit}" -p -- apt-get clean |
773 sudo apt-get clean | 773 sudo apt-get clean |
774 | 774 |
775 trap '' INT TERM QUIT HUP | 775 trap '' INT TERM QUIT HUP |
776 trap '' EXIT | 776 trap '' EXIT |
777 | 777 |
778 # Let the user know what we did | 778 # Let the user know what we did |
779 cat <<EOF | 779 cat <<EOF |
780 | 780 |
781 | 781 |
782 Successfully installed ${distname} ${arch} | 782 Successfully installed ${distname} ${arch} |
(...skipping 17 matching lines...) Expand all Loading... |
800 | 800 |
801 For Chrome, this probably means you want to make your "out" directory a | 801 For Chrome, this probably means you want to make your "out" directory a |
802 symbolic link that points somewhere inside of "${HOME}/chroot". | 802 symbolic link that points somewhere inside of "${HOME}/chroot". |
803 | 803 |
804 You still need to run "gclient runhooks" whenever you switch from building | 804 You still need to run "gclient runhooks" whenever you switch from building |
805 outside of the chroot to inside of the chroot. But you will find that you | 805 outside of the chroot to inside of the chroot. But you will find that you |
806 don't have to repeatedly erase and then completely rebuild all your object | 806 don't have to repeatedly erase and then completely rebuild all your object |
807 and binary files. | 807 and binary files. |
808 | 808 |
809 EOF | 809 EOF |
OLD | NEW |