release scripts should also not hardcode

This commit is contained in:
Louis Abel 2024-12-17 23:08:06 -07:00
parent ba5fe93f98
commit 723e822464
Signed by untrusted user: label
GPG Key ID: 2A6975660E424560
2 changed files with 8 additions and 9 deletions

View File

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Performs a full on sync of a minor release, directories and all. It calls the # Performs a full on sync of a minor release, directories and all. It calls the
# other scripts in this directory to assist where necessary. # other scripts in this directory to assist where necessary.
# Note that this is EL8 specific
# #
# Source common variables # Source common variables
# shellcheck disable=SC2046,1091,1090 # shellcheck disable=SC2046,1091,1090
@ -12,8 +11,8 @@ source $(dirname "$0")/common
# Major Version (eg, 8) # Major Version (eg, 8)
MAJ=${RLVER} MAJ=${RLVER}
if [[ "${RLVER}" -ne "8" ]]; then if [[ "${RLVER}" -eq "9" ]]; then
echo "This is only used for Rocky Linux 8 releases." echo "Invalid release"
exit 1 exit 1
fi fi
@ -85,8 +84,8 @@ done
# Change Symlink if required # Change Symlink if required
echo "Setting symlink to ${REV}" echo "Setting symlink to ${REV}"
pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit
/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/8-BETA" /bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/${MAJ}-BETA"
ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" 8-BETA ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" "${MAJ}-BETA"
echo "Attempting hard link" echo "Attempting hard link"
perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
popd || exit popd || exit

View File

@ -12,8 +12,8 @@ source $(dirname "$0")/common
# Major Version (eg, 8) # Major Version (eg, 8)
MAJ=${RLVER} MAJ=${RLVER}
if [[ "${RLVER}" -ne "8" ]]; then if [[ "${RLVER}" -eq "9" ]]; then
echo "This is only used for Rocky Linux 8 releases." echo "Invalid release"
exit 1 exit 1
fi fi
@ -85,8 +85,8 @@ done
# Change Symlink if required # Change Symlink if required
echo "Setting symlink to ${REV}" echo "Setting symlink to ${REV}"
pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit
/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/8-LookAhead" /bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/${MAJ}-LookAhead"
ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" 8-LookAhead ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" "${MAJ}-LookAhead"
echo "Attempting hard link" echo "Attempting hard link"
perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
popd || exit popd || exit