When you assign a variable directly (e.g., `FOO=bar`), you don't need
to quote the RHS, because the shell doesn't do expansion in that
case. But when you declare and assign a variable (e.g., `local
foo=bar`), you *do* potentially need to quote it, because `local` is a
command and all the normal expansion rules for running commands
applies.
}
format_last_commit_here() {
}
format_last_commit_here() {
+ local format="$1"; shift
TZ=UTC git log -n1 --first-parent "--format=format:$format" .
}
TZ=UTC git log -n1 --first-parent "--format=format:$format" .
}
- local gem_name=$1; shift
- local gem_version=$(nohash_version_from_git)
+ local gem_name="$1"; shift
+ local gem_version="$(nohash_version_from_git)"
local gem_src_dir="$(pwd)"
if ! [[ -e "${gem_name}-${gem_version}.gem" ]]; then
local gem_src_dir="$(pwd)"
if ! [[ -e "${gem_name}-${gem_version}.gem" ]]; then
local src_path="$1"; shift
local prog="$1"; shift
local description="$1"; shift
local src_path="$1"; shift
local prog="$1"; shift
local description="$1"; shift
- local license_file=${1:-agpl-3.0.txt}; shift
+ local license_file="${1:-agpl-3.0.txt}"; shift
debug_echo "package_go_binary $src_path as $prog"
debug_echo "package_go_binary $src_path as $prog"
ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
cd "$GOPATH/src/git.curoverse.com/arvados.git/$src_path"
ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
cd "$GOPATH/src/git.curoverse.com/arvados.git/$src_path"
- local version=$(version_from_git)
- local timestamp=$(timestamp_from_git)
+ local version="$(version_from_git)"
+ local timestamp="$(timestamp_from_git)"
# If the command imports anything from the Arvados SDK, bump the
# version number and build a new package whenever the SDK changes.
# If the command imports anything from the Arvados SDK, bump the
# version number and build a new package whenever the SDK changes.
- local package_name=$1; shift
- local package_version=$1; shift
+ local package_name="$1"; shift
+ local package_version="$1"; shift
local iteration=1
if [[ $package_version =~ ^0\.1\.([0-9]{14})(\.|$) ]] && \
[[ ${BASH_REMATCH[1]} -le $LICENSE_PACKAGE_TS ]]; then
local iteration=1
if [[ $package_version =~ ^0\.1\.([0-9]{14})(\.|$) ]] && \
[[ ${BASH_REMATCH[1]} -le $LICENSE_PACKAGE_TS ]]; then
- local venvdest=$1; shift
+ local venvdest="$1"; shift
if ! [[ -e "$venvdest/bin/activate" ]] || ! [[ -e "$venvdest/bin/pip" ]]; then
virtualenv --setuptools "$@" "$venvdest" || fatal "virtualenv $venvdest failed"
fi
if ! [[ -e "$venvdest/bin/activate" ]] || ! [[ -e "$venvdest/bin/pip" ]]; then
virtualenv --setuptools "$@" "$venvdest" || fatal "virtualenv $venvdest failed"
fi