Streamline logging

This commit is contained in:
Jose Gracia 2024-08-26 08:57:35 -05:00
parent 2bc8d50230
commit 5bf6349a64

View file

@ -19,7 +19,7 @@ if [[ "$#" -ne 4 ]]; then
exit 1
fi
echo "TODO: check for $TMPDIR"
echo "TODO: check for \$TMPDIR and execution bit in \$TMPDIR"
arg_repo=$1
arg_tag=$2
@ -29,7 +29,7 @@ arg_destination=$4
log () {
local msg=$1
if [[ -n $_VERBOSITY ]]; then
echo $msg
echo "*** $msg"
fi
}
@ -78,10 +78,10 @@ checkout_git () {
local dir=$3
local err
pushd $dir
pushd $dir > /dev/null
git clone --depth=1 --single-branch --branch=$tag -c feature.manyFiles=true $repo .
err=$?
popd
popd > /dev/null
return $err
}
@ -94,6 +94,6 @@ if [[ -z $destination_dir ]]; then
log "Covardly refusing to overwrite existing directory $arg_dir/$arg_destination."
exit 1
else
log "Checking out Spack from $repo at tag $release_tag into directory $destination_dir"
log "Checking out from $repo at tag $release_tag into directory $destination_dir"
checkout_git $repo $release_tag $destination_dir
fi