Adding bootstrap-includes.
authorDaniel Baumann <mail@daniel-baumann.ch>
Mon, 4 Nov 2013 17:59:23 +0000 (18:59 +0100)
committerDaniel Baumann <mail@daniel-baumann.ch>
Mon, 4 Nov 2013 17:59:23 +0000 (18:59 +0100)
components/bootstrap-includes [copied from components/chroot-includes with 69% similarity]
scripts/build/bootstrap

similarity index 69%
copy from components/chroot-includes
copy to components/bootstrap-includes
index ebf9fb5..f02235a 100755 (executable)
@@ -25,11 +25,11 @@ import sys
 def main():
        ## Parsing Arguments
        arguments = argparse.ArgumentParser(
-               prog            = 'lb chroot-includes',
+               prog            = 'lb bootstrap-includes',
                usage           = '%(prog)s [arguments]',
                description     = '''live-build contains the components to build a live system from a configuration directory.
-                                    The chroot-includes command copies include files into the chroot stage.''',
-               epilog          = 'See \'man lb-chroot-includes\' for more information.',
+                                    The bootstrap-includes command copies include files into the bootstrap stage.''',
+               epilog          = 'See \'man lb-bootstrap-includes\' for more information.',
                formatter_class = argparse.ArgumentDefaultsHelpFormatter
        )
 
@@ -41,12 +41,12 @@ def main():
        # --verbose
        verbose = args.verbose
 
-       ## Copying chroot includes
+       ## Copying bootstrap includes
 
        # stagefile
-       if os.path.isfile('.build/chroot-includes'):
+       if os.path.isfile('.build/bootstrap-includes'):
                if verbose:
-                       print('I: chroot-includes already done - nothing to do')
+                       print('I: bootstrap-includes already done - nothing to do')
 
                sys.exit(0)
 
@@ -72,9 +72,9 @@ def main():
                sys.exit(1)
 
        # includes
-       if not glob.glob('config/includes/*') and not glob.glob('config/includes/.*') and not glob.glob('config/includes.chroot/*') and not glob.glob('config/includes.chroot/.*'):
+       if not glob.glob('config/includes/*') and not glob.glob('config/includes/.*') and not glob.glob('config/includes.bootstrap/*') and not glob.glob('config/includes.bootstrap/.*'):
                if verbose:
-                       print ('I: no chroot includes found at config/includes.chroot - nothing to do')
+                       print ('I: no bootstrap includes found at config/includes.bootstrap - nothing to do')
 
                sys.exit(0)
 
@@ -87,17 +87,17 @@ def main():
 
                cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../chroot', shell=True)
 
-       if glob.glob('config/includes.chroot/*') and not glob.glob('config/includes.chroot/.*'):
-               hooks = glob.glob('config/includes.chroot/*') + glob.glob('config/includes.chroot/.*')
+       if glob.glob('config/includes.bootstrap/*') and not glob.glob('config/includes.bootstrap/.*'):
+               hooks = glob.glob('config/includes.bootstrap/*') + glob.glob('config/includes.bootstrap/.*')
 
                if verbose:
-                       print('I: Copying config/includes.chroot to chroot')
+                       print('I: Copying config/includes.bootstrap to chroot')
 
-               cpio = subprocess.call('cd config/includes.chroot && find . | cpio -dmpu --no-preserve-owner ../../chroot', shell=True)
+               cpio = subprocess.call('cd config/includes.bootstrap && find . | cpio -dmpu --no-preserve-owner ../../chroot', shell=True)
 
        # stagefile
        os.makedirs('.build', exist_ok=True)
-       open('.build/chroot-includes', 'w').close()
+       open('.build/bootstrap-includes', 'w').close()
 
 
 if __name__ == '__main__':
index 006d9d6..2249d69 100755 (executable)
@@ -53,6 +53,7 @@ lb chroot_hostname install ${@}
 lb chroot_apt install ${@}
 
 lb bootstrap_archives binary ${@}
+lb bootstrap-includes ${@}
 lb bootstrap-hooks ${@}
 
 # Deconfiguring chroot