From 3568b64e3971a1350c288fae67c0c48866ce1f41 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 25 Aug 2011 00:59:09 -0700 Subject: [PATCH] date -R is a linux-only option, switch to POSIX equivalent --- jobd/gc.sh | 5 ++++- jobd/update.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/jobd/gc.sh b/jobd/gc.sh index 036c7c7..7eb0d43 100755 --- a/jobd/gc.sh +++ b/jobd/gc.sh @@ -7,6 +7,9 @@ set -e proj="$1" cd "$cfg_reporoot/$proj.git" +# date -R is linux-only, POSIX equivalent is '+%a, %d %b %Y %T %z' +datefmt='+%a, %d %b %Y %T %z' + if check_interval lastgc $cfg_min_gc_interval; then progress "= [$proj] garbage check skip (last at $(config_get lastgc))" exit 0 @@ -40,6 +43,6 @@ quiet=; [ -n "$show_progress" ] || quiet=-q git repack -a -d --window-memory=1G -l $quiet git prune git update-server-info -config_set lastgc "$(date -R)" +config_set lastgc "$(date "$datefmt")" progress "- [$proj] garbage check (`date`)" diff --git a/jobd/update.sh b/jobd/update.sh index c04e058..a191b18 100755 --- a/jobd/update.sh +++ b/jobd/update.sh @@ -2,6 +2,9 @@ . @basedir@/shlib.sh +# date -R is linux-only, POSIX equivalent is '+%a, %d %b %Y %T %z' +datefmt='+%a, %d %b %Y %T %z' + # darcs fast-export | git fast-import with error handling git_darcs_fetch() { "$cfg_basedir"/bin/darcs-fast-export --export-marks=$(pwd)/dfe-marks --import-marks=$(pwd)/dfe-marks "$1" | \ @@ -58,7 +61,7 @@ case "$url" in esac bang git update-server-info -bang config_set lastrefresh "$(date -R)" +bang config_set lastrefresh "$(date "$datefmt")" # Look at which refs changed and trigger ref-change for these bang git for-each-ref --format '%(refname) %(objectname)' >.refs-after -- 2.11.4.GIT