diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:46 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:14:51 +0100 |
commit | fe6eb1c593e2df135c8807bf94df614984b4d6ec (patch) | |
tree | 693b803dcc6473a8699f0c605c92b10c24755e28 /helpers/lh_buildsource | |
parent | 470cf1764bf56b32addff591cfe3fd69af0e5760 (diff) | |
download | live-build-fe6eb1c593e2df135c8807bf94df614984b4d6ec.zip live-build-fe6eb1c593e2df135c8807bf94df614984b4d6ec.tar.gz |
Adding live-helper 1.0~a1-1.
Diffstat (limited to 'helpers/lh_buildsource')
-rwxr-xr-x | helpers/lh_buildsource | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/helpers/lh_buildsource b/helpers/lh_buildsource deleted file mode 100755 index 836bd3c..0000000 --- a/helpers/lh_buildsource +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -# lh_buildsource.sh <type> - -if [ ! -f "${LIVE_ROOT}"/.stage/image_source ] && [ "${LIVE_SOURCE}" = "yes" ] -then - # Configure chroot - lh_patchnetwork apply - - # Download sources - lh_chroot "dpkg --get-selections" | awk '{ print $1 }' > "${LIVE_CHROOT}"/root/dpkg-selection.txt - lh_chroot "xargs --arg-file=/root/dpkg-selection.txt apt-get source --download-only" - rm -f "${LIVE_CHROOT}"/root/dpkg-selection.txt - - # Sort sources - for DSC in "${LIVE_CHROOT}"/*.dsc - do - SOURCE="`awk '/Source:/ { print $2; }' ${DSC}`" - - if [ "`echo ${SOURCE} | cut -b 1-3`" == "lib" ] - then - LETTER="`echo ${SOURCE} | cut -b 1-4`" - else - LETTER="`echo ${SOURCE} | cut -b 1`" - fi - - # Install directory - install -d -m 0755 "${LIVE_ROOT}"/source/"${LETTER}"/"${SOURCE}" - - # Move files - mv "${LIVE_CHROOT}"/"${SOURCE}"_* "${LIVE_ROOT}"/source/"${LETTER}"/"${SOURCE}" - done - - case "${1}" in - generic) - # Create tarball - tar cf source.tar "$LIVE_ROOT"/source - ;; - - iso) - # Create image - ${GENISOIMAGE} -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"source.iso -r -J -l -V "${LIVE_DISK_VOLUME}" "${LIVE_ROOT}"/source - ;; - - net) - # Create tarball - tar cfz source.tar.gz "${LIVE_ROOT}"/source - ;; - - usb) - # Create image - DU_DIM="`du -ms ${LIVE_ROOT}/source | cut -f1`" - REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here... - dd if=/dev/zero of="${LIVE_ROOT}"/source.img bs=1024k count=${REAL_DIM} - FREELO=`losetup -f` - - echo "!!! The following error/warning messages can be ignored !!!" - lh_losetup $FREELO "${LIVE_ROOT}"/source.img 0 - set +e - lh_chroot "parted -s ${FREELO} mklabel msdos" - lh_chroot "parted -s ${FREELO} mkpartfs primary fat16 0.0 100%" - lh_chroot "parted -s ${FREELO} set 1 lba off" - set -e - losetup -d ${FREELO} - - lh_losetup $FREELO "${LIVE_ROOT}"/source.img 1 - lh_chroot "mkfs.msdos -n DEBIAN_LIVE ${FREELO}" - mkdir "${LIVE_ROOT}"/source.tmp - mount ${FREELO} "${LIVE_ROOT}"/source.tmp - cp -r "${LIVE_ROOT}"/source/* "${LIVE_ROOT}"/source.tmp - umount "${LIVE_ROOT}"/source.tmp - rmdir "${LIVE_ROOT}"/source.tmp - losetup -d ${FREELO} - echo "!!! The above error/warning messages can be ignored !!!" - ;; - esac - - - # Deconfigure network - lh_patchnetwork deapply - - # Touching stage file - touch "${LIVE_ROOT}"/.stage/image_source -fi |