summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-05-03 20:24:33 +0100
committerLyndon Brown <jnqnfe@gmail.com>2020-05-03 23:20:39 +0100
commitebf4b04b7f0bab4745ca9345c26a83d937a72578 (patch)
treec0742498c544380ecdfc89cdc8fb509d91438cb8 /scripts
parent558942eccb9d90aa5ba0b9e0158504669efe907c (diff)
downloadvyos-live-build-ebf4b04b7f0bab4745ca9345c26a83d937a72578.tar.gz
vyos-live-build-ebf4b04b7f0bab4745ca9345c26a83d937a72578.zip
source_disk: de-duplicate date construction
Gbp-Dch: Ignore
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/binary_disk4
-rwxr-xr-xscripts/build/source_disk14
2 files changed, 11 insertions, 7 deletions
diff --git a/scripts/build/binary_disk b/scripts/build/binary_disk
index 59bf5a42d..5ce5a0401 100755
--- a/scripts/build/binary_disk
+++ b/scripts/build/binary_disk
@@ -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
diff --git a/scripts/build/source_disk b/scripts/build/source_disk
index ca2bf6109..dc8398137 100755
--- a/scripts/build/source_disk
+++ b/scripts/build/source_disk
@@ -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