mirror of
https://github.com/rancher/os.git
synced 2025-09-01 23:04:41 +00:00
build based on os-config.yml
WIP: build scripts
This commit is contained in:
@@ -1,46 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
: ${ARTIFACTS:=$(pwd)/assets}
|
||||
: ${BUILD:=$(pwd)/build}
|
||||
: ${CONFIG:=$(pwd)/config}
|
||||
: ${DIST:=$(pwd)/dist}
|
||||
|
||||
BUILDROOT=buildroot-2014.11.tar.bz2
|
||||
DOCKER_FILE=${CONFIG}/.dockerfile
|
||||
|
||||
mkdir -p ${BUILD} ${DIST}
|
||||
|
||||
busybox_install()
|
||||
{
|
||||
local conf=$1
|
||||
local bbconf=$2
|
||||
local target=$3
|
||||
|
||||
if [ "$#" = "2" ]; then
|
||||
target=$2
|
||||
bbconf=
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y build-essential wget libncurses5-dev unzip bc
|
||||
|
||||
cd ${BUILD}
|
||||
|
||||
rm -rf ${BUILDROOT/.tar.bz2//}
|
||||
tar xvjf ${ARTIFACTS}/${BUILDROOT}
|
||||
cd ${BUILDROOT/.tar.bz2//}
|
||||
|
||||
cp $conf .config
|
||||
if [ -n "$bbconf" ]; then
|
||||
cp $bbconf package/busybox/
|
||||
fi
|
||||
make oldconfig
|
||||
make
|
||||
|
||||
cp output/images/rootfs.tar $target
|
||||
}
|
||||
|
||||
write_base()
|
||||
{
|
||||
if [ "${BASE_WRITTEN}" = "true" ]; then
|
||||
@@ -54,7 +20,6 @@ FROM ${DOCKER_BASE:=ubuntu:14.04.2}
|
||||
ENV TERM xterm
|
||||
ENV IN_DOCKER true
|
||||
WORKDIR /source
|
||||
CMD ["/source/scripts/install"]
|
||||
EOF
|
||||
|
||||
BASE_WRITTEN=true
|
||||
|
Reference in New Issue
Block a user