From 284a8d91e25e97d6a1d7d62bc0b15dbea6b5569a Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Sat, 28 May 2022 10:23:39 -0400 Subject: [PATCH] Fix: grobisplitter scripts. You cant touch a datefile until after the directory is created --- roles/grobisplitter/files/cents8-split.sh | 4 ++-- roles/grobisplitter/files/rhel8-split.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/grobisplitter/files/cents8-split.sh b/roles/grobisplitter/files/cents8-split.sh index 769723454a..e32aa770f6 100755 --- a/roles/grobisplitter/files/cents8-split.sh +++ b/roles/grobisplitter/files/cents8-split.sh @@ -10,7 +10,6 @@ DATE=$(date -Ih | sed 's/+.*//') KOJIDIR=/mnt/fedora/app/fi-repo/centos/stream8-kojitarget DATEDIR=${KOJIDIR}/${DATE} TIME_FILE=${DATEDIR}/timestamp -touch ${TIME_FILE} ## ## Make a directory for where the new tree will live. Use a new date @@ -20,7 +19,8 @@ if [ -d ${DATEDIR} ]; then echo "Directory already exists. Please remove or fix" exit else -mkdir -p ${DATEDIR} + mkdir -p ${DATEDIR} + touch ${TIME_FILE} fi ## diff --git a/roles/grobisplitter/files/rhel8-split.sh b/roles/grobisplitter/files/rhel8-split.sh index 24674909dd..e7ae889033 100755 --- a/roles/grobisplitter/files/rhel8-split.sh +++ b/roles/grobisplitter/files/rhel8-split.sh @@ -9,7 +9,6 @@ DATE=$(date -Ih | sed 's/+.*//') DATEDIR=${HOMEDIR}/koji/${DATE} TIME_FILE=${DATEDIR}/timestamp -touch ${TIME_FILE} ## ## Make a directory for where the new tree will live. Use a new date @@ -19,7 +18,8 @@ if [ -d ${DATEDIR} ]; then echo "Directory already exists. Please remove or fix" exit else -mkdir -p ${DATEDIR} + mkdir -p ${DATEDIR} + touch ${TIME_FILE} fi ##