<isodir>/systemrescuecd-<arch>-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)
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
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