From a341d6bfb585c2b07660b793b37a13ce781e79d3 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Mon, 2 Feb 2015 16:51:41 +0000 Subject: [PATCH] Avoid bash 4 code. Before bash 4 we can't use ^^ or ,, to transform to upper or lowercase. Use tr instead. --- .profile.d/git-commit-tree.bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.profile.d/git-commit-tree.bashrc b/.profile.d/git-commit-tree.bashrc index 37ec8eb..f1aca2c 100644 --- a/.profile.d/git-commit-tree.bashrc +++ b/.profile.d/git-commit-tree.bashrc @@ -1,11 +1,11 @@ # Set GIT_AUTHOR_NAME etc from dotfiles in the profile. function git_commit_tree() { local WHO=$1; shift - local who=${WHO,,} + local who="$(echo $WHO | tr '[[:upper:]]' '[[:lower:]]')" local WHAT= for WHAT in EMAIL NAME; do - local what=${WHAT,,} + local what="$(echo $WHAT | tr '[[:upper:]]' '[[:lower:]]')" local where= # Look in $HOME then $PROFILE_HOME. -- 2.20.1