small runshell optimisation

avoid some test -d for locale variables that are not set
This commit is contained in:
Joey Hess 2020-10-05 13:37:00 -04:00
parent 9e12e4c419
commit b91d97c3d2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -168,7 +168,7 @@ if [ -z "${LOCPATH+set}" ] && [ -z "$GIT_ANNEX_PACKAGE_INSTALL" ]; then
"$LC_COLLATE" "$LC_MONETARY" "$LC_MESSAGES" "$LC_PAPER" \
"$LC_NAME" "$LC_ADDRESS" "$LC_TELEPHONE" "$LC_MEASUREMENT" \
"$LC_IDENTIFICATION" "$LC_ALL"; do
if [ "$localeenv" != "$lastlocaleenv" ]; then
if [ -n "$localeenv" ] && [ "$localeenv" != "$lastlocaleenv" ]; then
lastlocaleenv="$localeenv"
if [ ! -d "$LOCPATH/$localeenv" ]; then
if [ "${localeenv##[!.]*.}" = "utf8" ] || [ "${localeenv##[!.]*.}" = "UTF-8" ]; then