This is branch with the new GA CI

It has the .circleci CI stuff as well
for comparison purposes.
This commit is contained in:
chick
2021-10-05 21:15:25 -07:00
parent c7293d507c
commit 52e8aa1957
13 changed files with 1222 additions and 1 deletions

29
.circleci/clean-old-files.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# clean directories that are older than 14 days
# argument is used as the directory to look in
age () {
local AGE_SEC
local CUR_SEC
local DIFF_SEC
local SEC_PER_DAY
SEC_PER_DAY=86400
CUR_SEC=$(date +%s)
AGE_SEC=$(stat -c %Y -- "$1")
DIFF_SEC=$(expr $CUR_SEC - $AGE_SEC)
echo $(expr $DIFF_SEC / $SEC_PER_DAY)
}
for d in $1/*/ ; do
DIR_AGE="$(age $d)"
if [ $DIR_AGE -ge 14 ]; then
echo "Deleting $d since is it $DIR_AGE old"
rm -rf $d
else
echo "Keep $d since it is $DIR_AGE old"
fi
done