From fcfb19e215b07be58f37c1f8dff096d52aec32f2 Mon Sep 17 00:00:00 2001 From: Tomasz Jurtsch Date: Tue, 29 Dec 2020 11:09:20 +0100 Subject: [PATCH] cleanup-anaconda: set missing variable --- cleanup-anaconda.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cleanup-anaconda.sh b/cleanup-anaconda.sh index c72e725..b9e0482 100755 --- a/cleanup-anaconda.sh +++ b/cleanup-anaconda.sh @@ -7,6 +7,12 @@ source $GITHUB_WORKSPACE/.github/scripts/test_anaconda.sh #if the timestamp is older than one week, remove the whole label ago="7 days ago" +if [ $OS_NAME = 'osx' ]; then + DATE_SWITCH="-r " +else + DATE_SWITCH="--date=@" +fi + #extract date in milliseconds limit_date=$(date $DATE_SWITCH "$ago" +'%s%N' | cut -b1-13)