autorun.inf renamed to autorun.ini
new cbox-build action "isoz" for compressed image (saves 100MB)
This commit is contained in:
parent
90384f68a9
commit
817b126130
3 changed files with 30 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
|||
####################### cbox-build ########################
|
||||
|
||||
# the build directory (will be ERASED without warning)
|
||||
BUILD_DIR="$ROOT_DIR/_builddir/cd1"
|
||||
BUILD_DIR="$ROOT_DIR/_builddir"
|
||||
|
||||
# the cryptobox development files
|
||||
TEMPLATE_DIR="$ROOT_DIR/cbox-tree.d"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
# config - apply cryptobox specific changes to the image directory
|
||||
# harden - remove unnecessary packages and disable developer features
|
||||
# iso - create the iso image
|
||||
# isoz - create a compressed iso image
|
||||
# burn - burns the image on a cd-rw
|
||||
#
|
||||
# final action:
|
||||
|
@ -48,6 +49,9 @@ if [ -e "$(get_config_file cbox-dev.conf)" ]
|
|||
# image directory created by dfsbuild
|
||||
# the BUILD_DIR is defined in the local cbox-dev.conf
|
||||
IMAGE_DIR="$BUILD_DIR/image"
|
||||
IMAGEZ_DIR="$BUILD_DIR/image.z"
|
||||
IMAGEZ_FILE="${IMAGE_FILE/\.iso/_compressed.iso}"
|
||||
UNCOMPRESSED_ITEMS="_offline autorun.ini start.html"
|
||||
|
||||
|
||||
####################### functions ######################
|
||||
|
@ -69,6 +73,27 @@ function create_iso()
|
|||
}
|
||||
|
||||
|
||||
function create_compressed_iso()
|
||||
{
|
||||
echo "Creating the compressed iso ..."
|
||||
[ -e "$IMAGEZ_DIR" ] && rm -r "$IMAGEZ_DIR"
|
||||
mkdir "$IMAGEZ_DIR"
|
||||
for a in $(ls "$IMAGE_DIR")
|
||||
do if echo "$UNCOMPRESSED_ITEMS" | grep -q -w "$a"
|
||||
then echo " Copying uncompressed item: $a ..."
|
||||
cp -a "$IMAGE_DIR/$a" "$IMAGEZ_DIR"
|
||||
else if [ -h "$IMAGE_DIR/$a" ]
|
||||
then echo " Copying link: $a ..."
|
||||
cp -a "$IMAGE_DIR/$a" "$IMAGEZ_DIR"
|
||||
else echo " Compressing item: $a ..."
|
||||
mkzftree "$IMAGE_DIR/$a" "$IMAGEZ_DIR/$a"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
mkisofs -z $MKISOFS_OPTIONS -o "$IMAGEZ_FILE" "$IMAGEZ_DIR"
|
||||
}
|
||||
|
||||
|
||||
function configure_cb()
|
||||
{
|
||||
if [ ! -e "$IMAGE_DIR" ]; then
|
||||
|
@ -140,6 +165,9 @@ while [ $# -gt 0 ]
|
|||
iso )
|
||||
create_iso
|
||||
;;
|
||||
isoz )
|
||||
create_compressed_iso
|
||||
;;
|
||||
harden )
|
||||
chroot "$IMAGE_DIR" "$CHROOT_START" /usr/lib/cryptobox/configure-cryptobox.sh secure
|
||||
;;
|
||||
|
@ -150,7 +178,7 @@ while [ $# -gt 0 ]
|
|||
$0 dfsbuild config harden iso
|
||||
;;
|
||||
help|--help )
|
||||
echo "Syntax: `basename $0` ( release | dfsbuild | config | harden | iso | burn | help )"
|
||||
echo "Syntax: `basename $0` ( release | dfsbuild | config | harden | iso | isoz | burn | help )"
|
||||
echo " (you may specify more than one action)"
|
||||
echo
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue