Using image name from configuration to name source output files.
This commit is contained in:
parent
e3bc849953
commit
21dcf9be33
|
@ -130,12 +130,12 @@ do
|
|||
;;
|
||||
|
||||
--source)
|
||||
rm -f source*.iso
|
||||
rm -f source*.img
|
||||
rm -f source*.tar
|
||||
rm -f source*.tar.gz
|
||||
rm -f source*.list
|
||||
rm -f source-selection.txt
|
||||
rm -f ${LIVE_IMAGE_NAME}-source*.iso
|
||||
rm -f ${LIVE_IMAGE_NAME}-source*.img
|
||||
rm -f ${LIVE_IMAGE_NAME}-source*.tar
|
||||
rm -f ${LIVE_IMAGE_NAME}-source*.tar.gz
|
||||
rm -f ${LIVE_IMAGE_NAME}-source*.list
|
||||
rm -f ${LIVE_IMAGE_NAME}-source-selection.txt
|
||||
|
||||
rm -rf source
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ EOF
|
|||
|
||||
# File list
|
||||
cd ${DIRECTORY}
|
||||
find . | sed -e 's|^.||g' | grep "^/" | sort > ../../$(echo ${DIRECTORY} | sed -e 's|/|.|').contents
|
||||
find . | sed -e 's|^.||g' | grep "^/" | sort > ../../${LIVE_IMAGE_NAME}-source.$(basename ${DIRECTORY}).contents
|
||||
cd "${OLDPWD}"
|
||||
done
|
||||
|
||||
|
|
|
@ -56,15 +56,15 @@ Check_package chroot/sbin/parted parted
|
|||
Install_package
|
||||
|
||||
# Remove old source
|
||||
if [ -f source.img ]
|
||||
if [ -f ${LIVE_IMAGE_NAME}-source.img ]
|
||||
then
|
||||
rm -f source.img
|
||||
rm -f ${LIVE_IMAGE_NAME}-source.img
|
||||
fi
|
||||
|
||||
# Everything which comes here needs to be cleaned up,
|
||||
DU_DIM="$(du -ms source | cut -f1)"
|
||||
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_BINARY_FILESYSTEM})"
|
||||
dd if=/dev/zero of=source.img bs=1024k count=0 seek=${REAL_DIM}
|
||||
dd if=/dev/zero of=${LIVE_IMAGE_NAME}-source.img bs=1024k count=0 seek=${REAL_DIM}
|
||||
FREELO="$(${LB_LOSETUP} -f)"
|
||||
if [ ! -b chroot/${FREELO} ]
|
||||
then
|
||||
|
@ -94,12 +94,12 @@ case "${LB_BINARY_FILESYSTEM}" in
|
|||
esac
|
||||
|
||||
Echo_warning "!!! The following error/warning messages can be ignored !!!"
|
||||
Losetup $FREELO source.img 0
|
||||
Losetup $FREELO ${LIVE_IMAGE_NAME}-source.img 0
|
||||
Chroot chroot "parted -s ${FREELO} mklabel msdos" || true
|
||||
Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true
|
||||
Lodetach ${FREELO}
|
||||
|
||||
Losetup $FREELO source.img 1
|
||||
Losetup $FREELO ${LIVE_IMAGE_NAME}-source.img 1
|
||||
|
||||
case "${LB_BINARY_FILESYSTEM}" in
|
||||
ext2|ext3|ext4)
|
||||
|
@ -134,7 +134,7 @@ Lodetach ${FREELO}
|
|||
Echo_warning "!!! The above error/warning messages can be ignored !!!"
|
||||
|
||||
FREELO="$(${LB_LOSETUP} -f)"
|
||||
Losetup "$FREELO" source.img 0
|
||||
Losetup "$FREELO" ${LIVE_IMAGE_NAME}-source.img 0
|
||||
Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
|
||||
Lodetach ${FREELO}
|
||||
|
||||
|
|
|
@ -59,9 +59,9 @@ Check_package chroot/usr/bin/xorriso xorriso
|
|||
Install_package
|
||||
|
||||
# Remove old iso image
|
||||
if [ -f source.iso ]
|
||||
if [ -f ${LIVE_IMAGE_NAME}-source.iso ]
|
||||
then
|
||||
rm -f source.iso
|
||||
rm -f ${LIVE_IMAGE_NAME}-source.iso
|
||||
fi
|
||||
|
||||
# Handle xorriso generic options
|
||||
|
@ -108,7 +108,8 @@ EOF
|
|||
Chroot chroot "sh source.sh"
|
||||
|
||||
# Move image
|
||||
mv chroot/source chroot/source.iso ./
|
||||
mv chroot/source ./
|
||||
mv chroot/source.iso ${LIVE_IMAGE_NAME}-source.iso
|
||||
rm -f chroot/source.sh
|
||||
|
||||
# Removing depends
|
||||
|
|
|
@ -50,31 +50,31 @@ Check_lockfile .lock
|
|||
Create_lockfile .lock
|
||||
|
||||
# Remove old source
|
||||
rm -f source.debian.tar.bz2 source.debian.tar.gz source.debian.tar.lz source.debian.tar
|
||||
rm -f source.debian-live.tar.bz2 source.debian-live.tar.gz source.debian-live.tar.lz source.debian-live.tar
|
||||
rm -f ${LIVE_IMAGE_NAME}-source.debian.tar.bz2 ${LIVE_IMAGE_NAME}-source.debian.tar.gz ${LIVE_IMAGE_NAME}-source.debian.tar.lz ${LIVE_IMAGE_NAME}-source.debian.tar
|
||||
rm -f ${LIVE_IMAGE_NAME}-source.debian-live.tar.bz2 ${LIVE_IMAGE_NAME}-source.debian-live.tar.gz ${LIVE_IMAGE_NAME}-source.debian-live.tar.lz ${LIVE_IMAGE_NAME}-source.debian-live.tar
|
||||
|
||||
tar cf source.debian.tar source/debian
|
||||
tar cf source.debian-live.tar source/debian-live
|
||||
tar cf ${LIVE_IMAGE_NAME}-source.debian.tar source/debian
|
||||
tar cf ${LIVE_IMAGE_NAME}-source.debian-live.tar source/debian-live
|
||||
|
||||
case "${LB_COMPRESSION}" in
|
||||
bzip2)
|
||||
bzip2 ${BZIP2_OPTIONS} source.debian.tar
|
||||
bzip2 ${BZIP2_OPTIONS} source.debian-live.tar
|
||||
bzip2 ${BZIP2_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar
|
||||
bzip2 ${BZIP2_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian-live.tar
|
||||
;;
|
||||
|
||||
gzip)
|
||||
gzip ${GZIP_OPTIONS} source.debian.tar
|
||||
gzip ${GZIP_OPTIONS} source.debian-live.tar
|
||||
gzip ${GZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar
|
||||
gzip ${GZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian-live.tar
|
||||
;;
|
||||
|
||||
lzip)
|
||||
lzip ${LZIP_OPTIONS} source.debian.tar
|
||||
lzip ${LZIP_OPTIONS} source.debian-live.tar
|
||||
lzip ${LZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar
|
||||
lzip ${LZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian-live.tar
|
||||
;;
|
||||
|
||||
xz)
|
||||
xz ${XZ_OPTIONS} source.debian.tar
|
||||
xz ${XZ_OPTIONS} source.debian-live.tar
|
||||
xz ${XZ_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar
|
||||
xz ${XZ_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian-live.tar
|
||||
;;
|
||||
|
||||
none)
|
||||
|
|
Loading…
Reference in New Issue