From f4d07b5a2550c7fa6db68a389dbff48dec9d3535 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 20 Dec 2018 22:01:26 -0500 Subject: Try to avoid random "ls" death * Use "find" to populate dev_specs --- mktestenv.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mktestenv.sh') diff --git a/mktestenv.sh b/mktestenv.sh index c60893d..5b1ac3b 100755 --- a/mktestenv.sh +++ b/mktestenv.sh @@ -132,12 +132,10 @@ fi # If a release dir already exists, calculate the iteration value from its contents. if [[ $calculate_iter == true ]]; then - find ${deliverable_dir} -type d -name ${name}/dev - if [[ ${?} -eq 0 ]]; then - dev_specs=$(ls -1 ${deliverable_dir}/${name}/dev/${deliverable}*${os}*${pyver_S}*.txt) - fi - latest_iter=-1 + dev_specs=$(find ${deliverable_dir} -type f -wholename \ + *${name}/dev/${deliverable}*${os}*${pyver_S}*.txt) + # Determine the highest iteration found for the release name for dev_spec in ${dev_specs}; do #echo $dev_spec -- cgit