Use -n instead of ! -z.

This commit is contained in:
Jesús 2021-12-31 23:46:37 -05:00
parent 25a57b557a
commit 56fb3bb208
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -296,17 +296,17 @@ scan-path=/var/lib/git/repositories
EOF EOF
# Append clone-prefix # Append clone-prefix
if [ ! -z "$CGIT_CLONE_PREFIX" ]; then if [ -n "$CGIT_CLONE_PREFIX" ]; then
echo "# Specify some default clone prefixes" >> /etc/cgitrc echo "# Specify some default clone prefixes" >> /etc/cgitrc
echo "clone-prefix=$CGIT_CLONE_PREFIX" >> /etc/cgitrc echo "clone-prefix=$CGIT_CLONE_PREFIX" >> /etc/cgitrc
fi 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 "# Set the title and heading of the repository index page" >> /etc/cgitrc
echo "root-title=$CGIT_ROOT_TITLE" >> /etc/cgitrc echo "root-title=$CGIT_ROOT_TITLE" >> /etc/cgitrc
fi fi
if [ ! -z "$CGIT_DESC" ]; then if [ -n "$CGIT_DESC" ]; then
echo "# Set description repository" >> /etc/cgitrc echo "# Set description repository" >> /etc/cgitrc
echo "root-desc=$CGIT_DESC" >> /etc/cgitrc echo "root-desc=$CGIT_DESC" >> /etc/cgitrc
fi fi