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.
37 lines
847 B
37 lines
847 B
#!/bin/bash |
|
#remaster lib |
|
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; } |
|
|
|
#filesystem_pack [chroot_path] [filesystem_img_destination] |
|
function filesystem_pack() { |
|
echo "pack filesystem ..." |
|
|
|
#$1 = chroot_path |
|
#$2 = filesystem_img_destination |
|
chroot_path="$1" |
|
filesystem_img_destination="$2" |
|
filesystem_log="`mktemp`" |
|
|
|
#Überfrüfen der Parameter |
|
[ -d "$chroot_path" ] || { |
|
echo "### ERROR ### filesystem_extract: chroot_path \"$chroot_path\" not exist!" |
|
return 12 |
|
} |
|
|
|
#loslegen ... |
|
rm -f "$filesystem_img_destination" |
|
mksquashfs "$chroot_path" "$filesystem_img_destination" > "$filesystem_log" || { |
|
echo "### ERROR ### filesystem_pack: mksquashfs failed!" |
|
return 13 |
|
} |
|
|
|
grep -v "\[" "$filesystem_log" |
|
rm "$filesystem_log" |
|
|
|
echo "done" |
|
} |
|
|
|
#this func is standalone executable |
|
[ -n "$1" ] && { |
|
filesystem_pack $@ |
|
}
|
|
|