15516: document the use of variables with the nameref argument set.
authorWard Vandewege <wvandewege@veritasgenetics.com>
Tue, 13 Aug 2019 16:41:27 +0000 (12:41 -0400)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Tue, 13 Aug 2019 16:41:27 +0000 (12:41 -0400)
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

build/run-library.sh

index e0b7a0b97480856428892b1384eee032b9595b1b..cb5549df7183676217270adc03b98b1ddbb0cf25 100755 (executable)
@@ -104,6 +104,9 @@ handle_ruby_gem() {
 }
 
 calculate_go_package_version() {
+  # $__returnvar has the nameref attribute set, which means it is a reference
+  # to another variable that is passed in as the first argument to this function.
+  # see https://www.gnu.org/software/bash/manual/html_node/Shell-Parameters.html
   local -n __returnvar="$1"; shift
   local src_path="$1"; shift
 
@@ -232,6 +235,9 @@ get_complete_package_name() {
     set +e
     trap 'set -e' RETURN
   fi
+  # $__returnvar has the nameref attribute set, which means it is a reference
+  # to another variable that is passed in as the first argument to this function.
+  # see https://www.gnu.org/software/bash/manual/html_node/Shell-Parameters.html
   local -n __returnvar="$1"; shift
   local pkgname="$1"; shift
   local version="$1"; shift