Verified Commit 3b6edca5 authored by Eli Schwartz's avatar Eli Schwartz Committed by Mattia Rizzolo

Replace several occurrences of parsing ls with cut, by the date command

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 33afb85f
......@@ -47,7 +47,7 @@ update_mock() {
echo "$(date -u ) - yum updated."
touch $STAMP
else
echo "$(date -u ) - mock and yum not updated, last update was at $(TZ=UTC ls --full-time $STAMP | cut -d ' ' -f6-7 | cut -d '.' -f1) UTC."
echo "$(date -u ) - mock and yum not updated, last update was at $(date -u --date=@$(stat -c %Y $STAMP) +'%F %T') UTC."
fi
rm $DUMMY > /dev/null
}
......@@ -258,4 +258,3 @@ echo "$(date -u) - $REPRODUCIBLE_URL/rpms/$RELEASE/$ARCH/$SRCPACKAGE/ updated."
cd
cleanup_all
trap - INT TERM EXIT
......@@ -20,7 +20,7 @@ create_pkg_state_and_html() {
if [ -z "$(cd $ARCHLINUX_PKG_PATH ; ls)" ] ; then
# directory exists but is empty: package is building…
echo "$(date -u ) - ignoring $PKG from '$REPOSITORY' which is building in $ARCHLINUX_PKG_PATH since $(LANG=C TZ=UTC ls --full-time -d $ARCHLINUX_PKG_PATH | cut -d ':' -f1-2 | cut -d " " -f6-) UTC"
echo "$(date -u ) - ignoring $PKG from '$REPOSITORY' which is building in $ARCHLINUX_PKG_PATH since $(date -u --date=@$(stat -c %Y $ARCHLINUX_PKG_PATH) +'%F %R') UTC"
return
fi
......@@ -172,7 +172,7 @@ create_pkg_state_and_html() {
esac
fi
echo " </td>" >> $HTML_BUFFER
local BUILD_DATE="$(LANG=C TZ=UTC ls --full-time $ARCHLINUX_PKG_PATH/build1.log | cut -d ':' -f1-2 | cut -d " " -f6- )"
local BUILD_DATE="$(date -u --date=@$(stat -c %Y $ARCHLINUX_PKG_PATH/build1.log) +'%F %R')"
if [ ! -z "$BUILD_DATE" ] ; then
BUILD_DATE="$BUILD_DATE UTC"
fi
......
......@@ -77,7 +77,7 @@ for PKG in $(find $RPMBASE/$RELEASE/$ARCH/* -maxdepth 1 -type d -exec basename {
done
fi
echo " </td>" >> $HTML_BUFFER
echo " <td>$(LANG=C TZ=UTC ls --full-time $RPM_PKG_PATH/build1.log | cut -d ' ' -f6 )</td>" >> $HTML_BUFFER
echo " <td>$(date -u --date=@$(stat -c %Y $RPM_PKG_PATH/build1.log) +%F)</td>" >> $HTML_BUFFER
for LOG in build1.log build2.log ; do
if [ -f $RPM_PKG_PATH/$LOG ] ; then
get_filesize $RPM_PKG_PATH/$LOG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment