Skip to content

Commit

Permalink
bind verbose and the use of the -g flag
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Oct 21, 2024
1 parent 2ac3a0d commit 039e8f7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions examples/upload_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ echo "overwrite: $overwrite"
echo "publish: $publish"
echo "verbose: $verbose"

if [ $verbose = 0 ]; then
gflag=""
else
gflag="-g"
fi


# hardcoded
yaml=$LMTOY/etc/config_prod.yaml

Expand Down Expand Up @@ -92,12 +99,12 @@ mkdir $out
#-------------------------------------------------------------
# create the YAMLs needed by dataverse in $out
for directory in ${in}/*; do
cmd="dvpipe -c $yaml -e ${envfile} -g lmtslr create_index -d $directory -o ${out}"
cmd="dvpipe -c $yaml -e ${envfile} $gflag lmtslr create_index -d $directory -o ${out}"
if [ "$verbose" -ne 0 ] || [ $dryrun -ne 0 ] ; then
echo "$cmd"
fi
if [ "$dryrun" -eq 0 ];then
#dvpipe -c $yaml -e ${envfile} -g lmtslr create_index -d $directory -o ${out}
#dvpipe -c $yaml -e ${envfile} $gflag lmtslr create_index -d $directory -o ${out}
eval $cmd
fi
done;
Expand All @@ -106,10 +113,10 @@ done;
if [ "$publish" -eq 1 ]; then
for index in ${out}/*.yaml; do
if [ "$verbose" -ne 0 ] || [ $dryrun -ne 0 ] ; then
echo "dvpipe -c $yaml -e ${envfile} -g dataset upload -a update -b major -i $index -p $dvname"
echo "dvpipe -c $yaml -e ${envfile} $gflag dataset upload -a update -b major -i $index -p $dvname"
fi
if [ "$dryrun" -eq 0 ];then
dvpipe -c $yaml -e ${envfile} -g dataset upload -a update -b major -i $index -p $dvname
dvpipe -c $yaml -e ${envfile} $gflag dataset upload -a update -b major -i $index -p $dvname
fi
done
fi

0 comments on commit 039e8f7

Please sign in to comment.