From: Iain Patterson Date: Mon, 2 Feb 2015 16:51:41 +0000 (+0000) Subject: Avoid bash 4 code. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=a341d6bfb585c2b07660b793b37a13ce781e79d3;p=profile.git Avoid bash 4 code. Before bash 4 we can't use ^^ or ,, to transform to upper or lowercase. Use tr instead. --- 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.