Was supposed to be a linux distribution, now just a collection of build scripts for packages on top of (ideally) any distribution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
717 B

#!/bin/sh
umask 022
set -e
if [ "$(id -u)" != "0" ]; then
echo "Please run this script as root" 1>&2
exit 1
fi
if [ ! "$rocket" ]; then
echo 'Please set the $rocket variable' 1>&2
exit 1
fi
mkdir -p "$rocket/dev" "$rocket/proc" "$rocket/sys" "$rocket/run"
mount --bind /dev "$rocket/dev"
mount -t devpts devpts "$rocket/dev/pts"
mount -t proc proc "$rocket/proc"
mount -t tmpfs tmpfs "$rocket/run"
if [ -h "$rocket/dev/shm" ]; then
mkdir -p "$rocket/$(readlink "$rocket/dev/shm")"
fi
chroot "$rocket" /tools/bin/env -i \
HOME=/root \
TERM="$TERM" \
PS1="(buildenv) \u:\w \$ " \
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/tools/bin \
MAKEFLAGS="$MAKEFLAGS" \
/tools/bin/ash -l