minor change + shellcheck
This commit is contained in:
parent
006ecbe7d4
commit
2ec3e333e5
1 changed files with 4 additions and 2 deletions
|
|
@ -65,9 +65,10 @@ set_volumes() {
|
|||
echo "$volumes"
|
||||
}
|
||||
|
||||
# Generates a random archive name of 20 alphanumeric characters
|
||||
generate_name() {
|
||||
local archive_name="$archive_dir/$(tr -dc '[:alnum:]' < /dev/urandom | head -c 20).7z"
|
||||
# Generates a random archive name of 20 alphanumeric characters
|
||||
local archive_name
|
||||
archive_name="$archive_dir/$(tr -dc '[:alnum:]' < /dev/urandom | head -c 20).7z"
|
||||
|
||||
log "INFO" "Generated archive name '$archive_name'"
|
||||
|
||||
|
|
@ -107,6 +108,7 @@ main() {
|
|||
trap 'cleanup "$archive_name"' ERR INT
|
||||
|
||||
log "INFO" "Packing '${input_file}' into archive '$archive_name' with password '${password}'"
|
||||
|
||||
create_archive \
|
||||
"$input_file" \
|
||||
"$password" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue