From c9a787f983fc20a52ddc103e062fcc6832ca1480 Mon Sep 17 00:00:00 2001 From: kevinnls <57634663+kevinnls@users.noreply.github.com> Date: Wed, 7 Apr 2021 22:54:21 +0530 Subject: [PATCH] use `date` in nanoseconds for unique naming instead of `$RANDOM` --- dev/testit | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/testit b/dev/testit index ee71508..9165171 100755 --- a/dev/testit +++ b/dev/testit @@ -27,7 +27,8 @@ src_dir="${project_root}/src" c_compilers=('gcc' 'clang') cpp_compilers=('g++' 'clang') -_oname="${project_name:0:5}-${project_version}~${curr_hash}_${RANDOM}" + # create a unique name using date in nano-seconds --- bc lolz +_oname="${project_name:0:5}-${project_version}~${curr_hash}_$(date +%N)" oname="$out_dir/${output:-${_oname}}" _iname="${src_dir}/main.c" iname="${input:-${_iname}}"