local only within functions

This commit is contained in:
2020-01-09 00:04:37 +01:00
parent 072e1d8f13
commit ebb17883a1

2
piwisync.sh Executable file → Normal file
View File

@@ -19,7 +19,7 @@ fi
subDir="$myyear/"
thumbRoot="${piwiThumbRoot}/${subDir}"
photoRoot="${piwiPhotoRoot}/${subDir}"
local yearRegex='[0-9]{4}'
yearRegex='[0-9]{4}'
if [ ! -e ${thumbRoot} ] ; then
if [ -w ${piwiThumbRoot} ] && [[ "$subDir" =~ $yearRegex ]] ; then