dmctl: l'option -a supporte les répertoires
This commit is contained in:
parent
ccf3c67278
commit
1c4c1c3faf
18
dmctl
18
dmctl
|
@ -8,6 +8,7 @@ function display_help() {
|
||||||
USAGE
|
USAGE
|
||||||
$scriptname -d NAME
|
$scriptname -d NAME
|
||||||
$scriptname -l ARCHIVE
|
$scriptname -l ARCHIVE
|
||||||
|
$scriptname -a ARCHIVEs...
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-d, --dump
|
-d, --dump
|
||||||
|
@ -131,12 +132,17 @@ case "$action" in
|
||||||
dump) dump_machine "$1";;
|
dump) dump_machine "$1";;
|
||||||
load) load_machine "$1";;
|
load) load_machine "$1";;
|
||||||
loadall)
|
loadall)
|
||||||
if [ $# -gt 0 ]; then
|
[ $# -gt 0 ] || set -- .
|
||||||
archives=("$@")
|
archives=()
|
||||||
else
|
for file in "$@"; do
|
||||||
NOCLOBBER=1
|
if [ -d "$file" ]; then
|
||||||
array_lsfiles archives . "*-machine.tar.gz"
|
NOCLOBBER=1
|
||||||
fi
|
array_lsfiles files "$file" "*-machine.tar.gz"
|
||||||
|
array_extend archives files
|
||||||
|
else
|
||||||
|
archives+=("$file")
|
||||||
|
fi
|
||||||
|
done
|
||||||
for archive in "${archives[@]}"; do
|
for archive in "${archives[@]}"; do
|
||||||
etitle "$archive"
|
etitle "$archive"
|
||||||
load_machine "$archive"
|
load_machine "$archive"
|
||||||
|
|
Loading…
Reference in New Issue