source_disk: de-duplicate date construction

Gbp-Dch: Ignore
This commit is contained in:
Lyndon Brown 2020-05-03 20:24:33 +01:00
parent 558942eccb
commit ebf4b04b7f
2 changed files with 11 additions and 7 deletions

View File

@ -109,7 +109,9 @@ case "${LB_DEBIAN_INSTALLER}" in
;;
esac
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} ${DISK_LABEL} Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
_DATE="$(date +%Y%m%d-%H:%M)"
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} ${DISK_LABEL} Binary ${_DATE}" > binary/.disk/info
if [ -n "${DISK_TYPE}" ]; then
echo "${DISK_TYPE}" > binary/.disk/cd_type

View File

@ -85,29 +85,31 @@ then
esac
fi
_DATE="$(date +%Y%m%d-%H:%M)"
case "${LB_DEBIAN_INSTALLER}" in
cdrom)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/CD Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/CD Source ${_DATE}" > source/.disk/info
;;
netinst)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETINST Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETINST Source ${_DATE}" > source/.disk/info
;;
netboot)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETBOOT Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETBOOT Source ${_DATE}" > source/.disk/info
;;
live)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/INSTALL Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/INSTALL Source ${_DATE}" > source/.disk/info
;;
businesscard)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/BC Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/BC Source ${_DATE}" > source/.disk/info
;;
none)
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE Source ${_DATE}" > source/.disk/info
;;
esac