Skip to content

Commit 6e6261e

Browse files
committed
It is a good idea to do a first real release and declare this as v1.0
1 parent 4420642 commit 6e6261e

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

ossperf.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# url: https://github.com/christianbaun/ossperf
99
# license: GPLv3
1010
# date: October 8th 2019
11-
# version: 3.8
11+
# version: 1.0
1212
# bash_version: 4.4.12(1)-release
1313
# requires: md5sum (tested with version 8.26),
1414
# bc (tested with version 1.06.95),
@@ -469,22 +469,26 @@ else
469469
fi
470470
fi
471471

472-
473-
474472
# Check if the directory already exists
475473
# This is not a part of the benchmark!
476474
if [ -e ${DIRECTORY} ] ; then
477475
# Terminate the script, in case the directory already exists
478-
echo -e "${RED}[ERROR] The directory ${DIRECTORY} already exists in the local directory!${NC}" && exit 1
479-
else
480-
if mkdir ${DIRECTORY} ; then
481-
# Create the directory if it does not already exist
482-
echo -e "${GREEN}[OK] The directory ${DIRECTORY} has been created in the local directory.${NC}"
476+
echo -e "${YELLOW}[INFO] The directory ${DIRECTORY} already exists in the local directory.${NC}"
477+
if rm -rf ${DIRECTORY} ; then
478+
echo -e "${GREEN}[OK] The old local directory ${DIRECTORY} has been erased.${NC}"
483479
else
484-
echo -e "${RED}[ERROR] Unable to create the directory ${DIRECTORY} in the local directory.${NC}" && exit 1
480+
echo -e "${RED}[ERROR] Unable to erase the local directory ${DIRECTORY}.${NC}" && exit 1
485481
fi
486482
fi
487483

484+
# Create the directory
485+
# This is not a part of the benchmark!
486+
if mkdir ${DIRECTORY} ; then
487+
echo -e "${GREEN}[OK] The local directory ${DIRECTORY} has been created.${NC}"
488+
else
489+
echo -e "${RED}[ERROR] Unable to create the local directory ${DIRECTORY}.${NC}" && exit 1
490+
fi
491+
488492
# Create files with random content of given size
489493
# This is not a part of the benchmark!
490494
for ((i=1; i<=${NUM_FILES}; i+=1))

0 commit comments

Comments
 (0)