From 56fb3bb208d167d615c4ee5f175d9eb1f2e62bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Fri, 31 Dec 2021 23:46:37 -0500 Subject: Use -n instead of ! -z. --- gitolite-cgit/entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gitolite-cgit') diff --git a/gitolite-cgit/entrypoint.sh b/gitolite-cgit/entrypoint.sh index c1ec87f..d4becda 100644 --- a/gitolite-cgit/entrypoint.sh +++ b/gitolite-cgit/entrypoint.sh @@ -296,17 +296,17 @@ scan-path=/var/lib/git/repositories EOF # Append clone-prefix - if [ ! -z "$CGIT_CLONE_PREFIX" ]; then + if [ -n "$CGIT_CLONE_PREFIX" ]; then echo "# Specify some default clone prefixes" >> /etc/cgitrc echo "clone-prefix=$CGIT_CLONE_PREFIX" >> /etc/cgitrc fi - if [ ! -z "$CGIT_ROOT_TITLE" ]; then + if [ -n "$CGIT_ROOT_TITLE" ]; then echo "# Set the title and heading of the repository index page" >> /etc/cgitrc echo "root-title=$CGIT_ROOT_TITLE" >> /etc/cgitrc fi - if [ ! -z "$CGIT_DESC" ]; then + if [ -n "$CGIT_DESC" ]; then echo "# Set description repository" >> /etc/cgitrc echo "root-desc=$CGIT_DESC" >> /etc/cgitrc fi -- cgit v1.2.3