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 #!/bin/bash
if [[ ! -f README.md ]]; then 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 .. cd ..
done
if [ "${counter}" -ge 5 ];then
echo "${common_example_dir} not found in upper directories!"
exit 1
fi fi
folder_list=( folder_list=(