logerrit |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 69959235c3094b811406f734e863a63fc61046c0
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Tue Mar 9 19:29:19 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Mar 10 11:21:50 2021 +0100

    adapt recent change to macOS
    
    ... from
        commit e7a471a8fbac22877973af7e7be8c6a0701b4046
        logerrit: do not submit if parent is older than a week
    
    Change-Id: Icd1ee7f66dbbcef90add9e4ddecfdb9bbc0900e4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112234
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/logerrit b/logerrit
index bae806a5939e..fc30f918c17c 100755
--- a/logerrit
+++ b/logerrit
@@ -24,7 +24,11 @@ submit() {
         fi
 
         if [ "$BRANCH" = "master" ]; then
-            WEEKOLDDATE=$(date --date="7 days ago" +%s)
+            if [ "$unamestr" = 'Linux' ]; then
+                WEEKOLDDATE=$(date --date="7 days ago" +%s)
+            else
+                WEEKOLDDATE=$(date -v7d +%s) # BSD equivalent
+            fi
             PARENTDATE=$(git show -s --format=%ct HEAD~1)
             if [[ $PARENTDATE -lt $WEEKOLDDATE ]]; then
                 echo "Your branch is older than a week, do './g pull -r' and 
retry"
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to