diff options
author | Jonathan Bauer | 2013-03-13 17:33:57 +0100 |
---|---|---|
committer | Jonathan Bauer | 2013-03-13 17:33:57 +0100 |
commit | 1efcd9ce0605ed8694f621b9889843ceca673b10 (patch) | |
tree | 92890797e88f3f4e7153811f800b3acf87aa62be /helper/fileutil.inc | |
parent | stage3.1 'debug' to drop a shell (diff) | |
download | tm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.tar.gz tm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.tar.xz tm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.zip |
plymouth for stage3.1
Diffstat (limited to 'helper/fileutil.inc')
-rw-r--r-- | helper/fileutil.inc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc index 3bfe374c..4855e326 100644 --- a/helper/fileutil.inc +++ b/helper/fileutil.inc @@ -52,8 +52,9 @@ list_packet_files() { done done } - +# # install all dependencies of a module +# goes through all package as given in the variable REQUIRED_DEPENDENCIES install_dependencies() { [ -z "$REQUIRED_DEPENDENCIES" ] && return if [ "$PACKET_MANAGER" = "apt" ]; then @@ -63,7 +64,11 @@ install_dependencies() { fi } +# # generate initramfs of directory +# usage: +# generate_initramfs <target_filename> <source_dir> +# generate_initramfs() { [ $# -ne 2 ] && perror "Sanity check failed: generate_initramfs needs exactly two params, but $# were given." cd "$2" || perror "Cannot cd to '$2'" @@ -73,6 +78,16 @@ generate_initramfs() { [ "x${PS[1]}" != "x0" ] && perror "cpio create failed." [ "x${PS[2]}" != "x0" ] && perror "gzip to '${MODULE_DIR}/$1' failed." cd - - pinfo "initramfs of $2 created at ${MODULE_DIR}/$1" + pinfo "Created initramfs of $2 at ${MODULE_DIR}/$1" } +# generates squashfs of directory +# usage: +# generate_squashfs <target_filename> <source_dir> +generate_squashfs() { + [ $# -ne 2 ] && perror "Sanity check failed: generate_squashfs needs exactly two params, but $# were given." + [ -d $2 ] || perror "$2 is not a directory." + mksquashfs "$2" "${MODULE_DIR}/$1" -comp xz -b 1M -no-recovery >&6 \ + || perror "mksquashfs failed ($?)." + pinfo "Created squashfs of $2 at ${MODULE_DIR}/$1" +} |