From: W. Trevor King Date: Tue, 23 Mar 2010 17:34:17 +0000 (-0400) Subject: Make a distinction between ARCH and BASEARCH in recreate-iso.sh X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8caa67883e1786dd62abece99230fa797ead64a8;p=systemrescuecd.git Make a distinction between ARCH and BASEARCH in recreate-iso.sh For example, the amd64 and i386 architectures (and others) are all x86 processors. This saves a lot of symlinking by using overlay-squashfs-x86/ rather than overlay-squashfs-amd64/ overlay-squashfs-i386/ ... and so on. --- diff --git a/buildscripts/recreate-iso.sh b/buildscripts/recreate-iso.sh index 05a761f..7c6c000 100755 --- a/buildscripts/recreate-iso.sh +++ b/buildscripts/recreate-iso.sh @@ -29,7 +29,7 @@ Options: /systemrescuecd--current.iso -w WORKDIR Set the work directory for the custom CD (${WORKDIR}) -r REPOSRC Location of git systemrescuecd repo ($REPOSRC) - -r REPOBIN ? ($REPOBIN) + -b REPOBIN ? ($REPOBIN) -d DESTDIR Set the directory for saving the rebuild iso file ($DESTDIR) -m MOUNTDIR Set the directory for mounting the current iso ($MOUNTDIR) -e EXTRAVER Extra version information for f1boot.msg ($EXTRAVER) @@ -53,14 +53,19 @@ do done shift $(($OPTIND - 1)) +ARCH="$1" if [ "$1" = "x86" ] || [ "$1" = "amd64" ] || [ "$1" = "sparc" ] then ARCH="$1" else - usage # handles --help - exit 1 fi -VERSION=$(cat ${REPOSRC}/overlay-squashfs-${ARCH}/root/version) +case ${ARCH} in + x86) BASEARCH="x86";; + amd64) BASEARCH="x86";; + sparc) BASEARCH="sparc";; + *) usage; exit 1;; +esac +VERSION=$(cat ${REPOSRC}/overlay-squashfs-${BASEARCH}/root/version) VOLNAME="sysrcd-${VERSION}" ## ERROR HANDLING @@ -97,10 +102,10 @@ cp ${MOUNTDIR}/image.squashfs ${WORKDIR}/sysrcd.dat umount ${MOUNTDIR} # ========= copy files from overlays =========================================== -rsync -ax ${REPOBIN}/overlay-iso-${ARCH}/ "${WORKDIR}/" -rsync -ax ${REPOSRC}/overlay-iso-${ARCH}/isolinux/ "${WORKDIR}/isolinux/" +rsync -ax ${REPOBIN}/overlay-iso-${BASEARCH}/ "${WORKDIR}/" +rsync -ax ${REPOSRC}/overlay-iso-${BASEARCH}/isolinux/ "${WORKDIR}/isolinux/" rsync -ax ${REPOBIN}/kernels-${ARCH}/ ${WORKDIR}/isolinux/ --exclude='*.igz' -cp ${REPOSRC}/overlay-squashfs-${ARCH}/root/version ${WORKDIR} +cp ${REPOSRC}/overlay-squashfs-${BASEARCH}/root/version ${WORKDIR} # ========= integrate the version number in f1boot.msg ========================= sed -i -e "s/VERSION/${VERSION}${EXTRAVER}/" ${WORKDIR}/isolinux/f1boot.msg