fixed passes parameter, added shorthands

This commit is contained in:
Markus Ressel 2020-07-30 20:05:27 +02:00
parent 421792b04b
commit c070f4a178
2 changed files with 4 additions and 4 deletions

View File

@ -65,8 +65,8 @@ You can print a help message by running the script without any parameters:
| Name | Description | Default | | Name | Description | Default |
|-----------|-------------|---------| |-----------|-------------|---------|
| -checksum | Whether to compare attributes and content of the copied file using an **MD5** checksum. Technically this is a redundent check and consumes a lot of resources, so think twice. | `true` | | `-c` | `--checksum` | Whether to compare attributes and content of the copied file using an **MD5** checksum. Technically this is a redundent check and consumes a lot of resources, so think twice. | `true` |
| -passes | The maximum number of rebalance passes per file. Setting this to infinity by using a value `<= 0` might improve performance when rebalancing a lot of small files. | `1` | | `-p` | `--passes` | The maximum number of rebalance passes per file. Setting this to infinity by using a value `<= 0` might improve performance when rebalancing a lot of small files. | `1` |
### Example ### Example

View File

@ -176,7 +176,7 @@ fi
while true ; do while true ; do
case "$1" in case "$1" in
-checksum ) -c | --checksum )
if [ "$2" -eq 1 ] || [[ "$2" =~ (on|true|yes) ]]; then if [ "$2" -eq 1 ] || [[ "$2" =~ (on|true|yes) ]]; then
checksum_flag="true" checksum_flag="true"
else else
@ -184,7 +184,7 @@ while true ; do
fi fi
shift 2 shift 2
;; ;;
-count ) -p | --passes )
passes_flag=$2 passes_flag=$2
shift 2 shift 2
;; ;;