3 ## live-build(7) - System Build Scripts
4 ## Copyright (C) 2006-2014 Daniel Baumann <mail@daniel-baumann.ch>
6 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7 ## This is free software, and you are welcome to redistribute it
8 ## under certain conditions; see COPYING for details.
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && .
"${LIVE_BUILD}/scripts/build.sh" || .
/usr
/lib
/live
/build.sh
16 # Setting static variables
17 DESCRIPTION
="$(Echo 'use tmpfs to speedup the build')"
19 USAGE
="${PROGRAM} {install|remove} [--force]"
23 # Reading configuration files
24 Read_conffiles config
/all config
/common config
/bootstrap config
/chroot config
/binary config
/source
27 if [ "${LB_BUILD_WITH_TMPFS}" != "true" ]
32 # Requiring stage file
33 Require_stagefile .build
/config .build
/bootstrap
37 Echo_message
"Configuring tmpfs for /var/lib/dpkg"
40 Check_stagefile .build
/chroot_tmpfs
48 mv chroot
/var
/lib
/dpkg chroot
/var
/lib
/dpkg.tmp
49 mkdir chroot
/var
/lib
/dpkg
50 mount
-t tmpfs tmpfs chroot
/var
/lib
/dpkg
51 mv chroot
/var
/lib
/dpkg.tmp
/* chroot
/var
/lib
/dpkg
52 rm -rf chroot
/var
/lib
/dpkg.tmp
55 Create_stagefile .build
/chroot_tmpfs
59 Echo_message
"Deconfiguring tmpfs for /var/lib/dpkg"
67 mkdir
-p chroot
/var
/lib
/dpkg.tmp
68 mv chroot
/var
/lib
/dpkg
/* chroot
/var
/lib
/dpkg.tmp
69 umount chroot
/var
/lib
/dpkg
70 rm -rf chroot
/var
/lib
/dpkg
71 mv chroot
/var
/lib
/dpkg.tmp chroot
/var
/lib
/dpkg
74 rm -f .build
/chroot_tmpfs