@@ -24,35 +24,41 @@ for COMPOSE in "${NONSIG_COMPOSE[@]}"; do
2424
2525 if [[ " ${COMPOSE} " == " Rocky" ]]; then
2626 # ISO Work before syncing
27- mkdir -p isos/{x86_64,aarch64}
27+ for ARCH in " ${ARCHES[@]} " ; do
28+ mkdir -p " isos/${ARCH} "
29+ done
2830
2931 # Sort the ISO's
3032 for ARCH in " ${ARCHES[@]} " ; do
31- for x in BaseOS Minimal; do
32- if [[ " ${x} " != " BaseOS" ]]; then
33- echo " ${x} ${ARCH} : Removing unnecessary boot image"
34- /bin/rm -v " ${x} /${ARCH} /iso/Rocky-${REVISION} -20" * " ${ARCH} " * .iso
33+ for x in " ${ISO_TYPES[@]} " ; do
34+ # # Check if the ISO even exists, if not skip
35+ if ls " ${x} /${ARCH} /iso/" * .iso 1> /dev/null 2>&1 ; then
36+ echo " ${x} ${ARCH} : Moving ISO images"
37+ mv " ${x} /${ARCH} /iso/" * " isos/${ARCH} /"
38+ else
39+ echo " ${x} ${ARCH} : No ISOs were found"
3540 fi
36- echo " ${x} ${ARCH} : Moving ISO images "
37- mv " ${x} /${ARCH} /iso/ " * " isos /${ARCH} /"
41+ echo " ${x} ${ARCH} : Removing original ISO directory if applicable "
42+ test -d " ${x} /${ARCH} /iso" && rmdir " ${x} /${ARCH} /iso "
3843 done
3944 pushd " isos/${ARCH} " || { echo " ${ARCH} : Failed to change directory" ; break ; }
40- # ln -s "Rocky-${REVISION}-${ARCH}-boot.iso" "Rocky-${ARCH}-boot.iso"
41- # ln -s "Rocky-${REVISION}-${ARCH}-dvd1.iso" "Rocky-${ARCH}-dvd1.iso"
42- # ln -s "Rocky-${REVISION}-${ARCH}-dvd1.iso" "Rocky-${ARCH}-dvd.iso"
43- # ln -s "Rocky-${REVISION}-${ARCH}-minimal.iso" "Rocky-${ARCH}-minimal.iso"
4445 for file in * .iso; do
4546 printf " # %s: %s bytes\n%s\n" \
4647 " ${file} " \
4748 " $( stat -c %s ${file} -L) " \
4849 " $( sha256sum --tag ${file} ) " \
49- | sudo tee -a CHECKSUM;
50+ | sudo tee -a " ${file} . CHECKSUM"
5051 done
52+ cat ./* .CHECKSUM > CHECKSUM
5153 popd || { echo " Could not change directory" ; break ; }
5254 done
53- mkdir -p live/x86_64
54- ln -s live Live
55+ # Sort the cloud images here. Probably just a directory move, make some checksums (unless they're already there)
56+ # Live images should probably be fine. Check anyway what we want to do. Might be a simple move.
5557 fi
58+ # Delete the unnecessary dirs here.
59+ for EMPTYDIR in " ${NONREPO_DIRS[@]} " ; do
60+ rm -rf " ${EMPTYDIR} "
61+ done
5662 popd || { echo " ${COMPOSE} : Failed to change directory" ; break ; }
5763
5864 TARGET=" ${STAGING_ROOT} /${CATEGORY_STUB} /${REV} "
@@ -66,7 +72,6 @@ for COMPOSE in "${NONSIG_COMPOSE[@]}"; do
6672 popd || { echo " ${COMPOSE} : Failed to change directory" ; break ; }
6773done
6874
69-
7075# Create symlinks for repos that were once separate from the main compose
7176for LINK in " ${! LINK_REPOS[@]} " ; do
7277 ln -sr " ${STAGING_ROOT} /${CATEGORY_STUB} /${REV} /${LINK} " \
0 commit comments