lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master e2d29d4 4/4: Avoid ':' in filenames


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e2d29d4 4/4: Avoid ':' in filenames
Date: Thu, 27 Feb 2020 16:09:38 -0500 (EST)

branch: master
commit e2d29d494be91cb2e72d3ce5951b22234b9618b7
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Avoid ':' in filenames
---
 install_redhat.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/install_redhat.sh b/install_redhat.sh
index e0957ce..6312af3 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -28,6 +28,9 @@ set -evx
 stamp0=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
 echo "Started: $stamp0"
 
+# Timestamp usable as a component of a portable filename.
+fstamp=$(date -u +"%Y%m%dT%H%MZ" -d "$stamp0")
+
 assert_su
 assert_not_chrooted
 
@@ -162,8 +165,8 @@ schroot --chroot=${CHRTNAME} --preserve-environment 
--user="${NORMAL_USER}" --di
 
 # Copy log files that may be useful for tracking down problems with
 # certain commands whose output is voluminous and often uninteresting.
-cp -a /srv/chroot/${CHRTNAME}/home/"${NORMAL_USER}"/log 
/home/"${NORMAL_USER}"/lmi_rhlog_"${stamp0}"
-cp -a /srv/chroot/${CHRTNAME}/tmp/${CHRTNAME}-apt-get-log 
/home/"${NORMAL_USER}"/apt-get-log-"${stamp0}"
+cp -a /srv/chroot/${CHRTNAME}/home/"${NORMAL_USER}"/log 
/home/"${NORMAL_USER}"/lmi_rhlog_"${fstamp}"
+cp -a /srv/chroot/${CHRTNAME}/tmp/${CHRTNAME}-apt-get-log 
/home/"${NORMAL_USER}"/apt-get-log-"${fstamp}"
 
 stamp1=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
 echo "Finished: $stamp1"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]