From b91d97c3d25f21f08b0fe31c9b61c80f94df5759 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2020 13:37:00 -0400 Subject: [PATCH] small runshell optimisation avoid some test -d for locale variables that are not set --- standalone/linux/skel/runshell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standalone/linux/skel/runshell b/standalone/linux/skel/runshell index b3683dd46d..3c60ce1e43 100755 --- a/standalone/linux/skel/runshell +++ b/standalone/linux/skel/runshell @@ -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