From 6262754028e750dbbacd1d68618bf5553d78f3cd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 17 Apr 2016 14:45:58 -0400 Subject: Use += instead of jumping through hoops. The += operator was introduced in Bash 3.1, and was already used in some places in dbscripts, but not everywhere. For normal strings, this isn't a big deal, but appending to an array without using += is nasty. --- db-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db-functions') diff --git a/db-functions b/db-functions index 9845e45..f00ed55 100644 --- a/db-functions +++ b/db-functions @@ -197,7 +197,7 @@ repo_lock () { warning "Repo [%s] (%s) is already locked by %s." "${1}" "${2}" "$_owner" msg2 "Retrying in %d seconds..." "$LOCK_DELAY" else - LOCKS[${#LOCKS[*]}]="$1.$2" + LOCKS+=("$1.$2") set_umask return 0 fi -- cgit v1.2.3