made script more generic

This commit is contained in:
Robin Müller 2022-05-22 15:27:54 +02:00
parent be6e94bf87
commit b53aed9cf9
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -1,6 +1,18 @@
#!/bin/bash
if [[ ! -f README.md ]]; then
cd ..
counter=0
common_example_dir="example_common"
while [ ${counter} -lt 5 ]
do
if [ ! -d ${common_example_dir} ];then
break
fi
counter=$((counter=counter + 1))
cd ..
done
if [ "${counter}" -ge 5 ];then
echo "${common_example_dir} not found in upper directories!"
exit 1
fi
folder_list=(