Skip to content

Commit

Permalink
Added -q option to dirsync
Browse files Browse the repository at this point in the history
  • Loading branch information
shodanshok committed Oct 10, 2018
1 parent 35a4f3c commit 143ea37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dirsync
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ print_usage() {
}

# Option parsing
while getopts ":h" opt; do
while getopts ":h:q" opt; do
case $opt in
q)
options="-q"
;;
h)
print_usage
;;
Expand Down Expand Up @@ -45,7 +48,7 @@ oldIFS=$IFS; IFS=$'\n'
for image in `ls $srcdir`; do
echo $image | grep -q "[[:space:]]" && spaced=true
$spaced && global_exit_code=2 && echo "path with spaces are not supported, skipping $image" && continue
/root/blocksync.py -f $srcdir/$image $dsthost $dstdir/$image; local_exit_code=$?
/root/blocksync.py $options -f $srcdir/$image $dsthost $dstdir/$image; local_exit_code=$?
if [ $local_exit_code -ne 0 ]; then
global_exit_code=$local_exit_code
fi
Expand Down

0 comments on commit 143ea37

Please sign in to comment.