OpenSDE Framework (without history before r20070)
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.

36 lines
1.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: target/share/docker/build.sh
  5. # Copyright (C) 2016 - 2020 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. #Description: Build a compressed rootfs for docker images
  15. set -e
  16. . $base/target/share/functions.in
  17. dockerdir="$build_toolchain/docker"
  18. imagelocation="$build_toolchain/rootfs" # where the roofs is prepared and compress.
  19. rm -rf $dockerdir
  20. rm -rf $imagelocation
  21. mkdir -p $dockerdir
  22. mkdir -p $imagelocation
  23. cd $build_toolchain/pkgs
  24. echo "Populating the root file-system (this may take some time) ..."
  25. for pack in *.bz2; do
  26. tar -xjf $pack -C $imagelocation
  27. done
  28. echo "Creating root file-system (this may take some time) ..."
  29. cd $dockerdir
  30. time tar -cjf rootfs.tar.bz2 -C $imagelocation .
  31. echo_status "Done!"