Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c7b51f9bfd
Fetching contributors…

Cannot retrieve contributors at this time

executable file 58 lines (41 sloc) 1.436 kb
#!/bin/sh -e
sinfo() {
echo ${BASH:+-e} "\033[1;37;43m$@\033[0m"
}
# Must have root directory as an argument
# "fresh" parameter can be given in subsequent invocation
# (erasing ${LIVECD}/src will do the same)
if [ -z "$1" -o \( -n "$2" -a "$2" != fresh \) ]; then
echo "$0 <livecd root> [fresh]"
exit 1
fi
if [ `id -u` != 0 -o `id -g` != 0 ]; then
echo "Must be root"
exit 1
fi
# Variables
SRC=`dirname $0`
LIVECD=$1
# If "fresh" parameter is passed, rewrites ${LIVECD}/src
sinfo "Downloading and extracting stage3 and portage snapshots"
${SRC}/mkroot ${LIVECD} $2
# If "fresh" parameter is passed, rebuilds system from scratch
sinfo "Installing packages"
${SRC}/enter ${LIVECD} -c "./setup $2"
# Reverse emerge rewriting /etc files during full build
sinfo "Restoring configuration files"
${SRC}/enter ${LIVECD} -c true
# Destructive operations are done on ${LIVECD}/copy
sinfo "Synchronizing to a temporary copy"
${SRC}/mkroot ${LIVECD} copy
# Cleans up ${LIVECD}/copy from inside
sinfo "Uninstalling development packages"
${SRC}/enter ${LIVECD} copy -c ./setup-copy
# Cleans up ${LIVECD}/copy from outside
sinfo "Pruning the temporary copy"
${SRC}/mkroot ${LIVECD} clean
# Builds "liberte" dir in ${LIVECD}/dist to deploy
sinfo "Mastering deployment directory"
${SRC}/enter ${LIVECD} image -c ./mkimage
# OK to copy "liberte" dir and run setup.sh
sinfo "Done: ZIP archive in ${LIVECD}/dist"
Jump to Line
Something went wrong with that request. Please try again.