30 lines
942 B
Bash
30 lines
942 B
Bash
#!/bin/bash
|
|
|
|
#
|
|
# build_in_chroot.sh - Build libglacier and install it in a simple chroot
|
|
#
|
|
# This file is part of Glacier.
|
|
#
|
|
# Glacier is free software: you can redistribute it and/or modify it under the terms of the
|
|
# GNU General Public License as published by the Free Software Foundation, either
|
|
# version 3 of the License, or (at your option) any later version.
|
|
#
|
|
# Glacier is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License along with Glacier. If
|
|
# not, see <https://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
init_chroot() {
|
|
mkdir -v ./chroot
|
|
cd ./chroot
|
|
git clone https://gitlab.com/buildroot.org/buildroot.git
|
|
cd buildroot
|
|
cp ../../SAVED_CONFIG ./.config
|
|
make -j$(nproc)
|
|
}
|
|
|
|
init_chroot "$@"
|