diff options
-rwxr-xr-x | scripts/clone_stage4 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/clone_stage4 b/scripts/clone_stage4 index 339d9eea..8804a57a 100755 --- a/scripts/clone_stage4 +++ b/scripts/clone_stage4 @@ -18,11 +18,12 @@ qnd_exit() { [ $# -ge 1 ] && kill "$1" } -[ $# -lt 3 ] && perror "$0 <remote_ip> <stage_to_exclude> <target_dir>" -[ "$1" = "local" ] && perror 'It is not wise to use "local" as remote IP.' +[ $# -lt 2 ] && perror "$0 <remote_ip> <target_dir>" +[ "$1" = "local" ] && perror 'It is not wise to use "local" as remote IP.' BOOT_DIR="${ROOT_DIR}/server/boot/$1" -TARGET_DIR="$3" +[ $# -eq 3 ] && shift # compat with old calling convention "$0 <remote_ip> <stage_to_exclude> <target_dir>" +TARGET_DIR="$2" mkdir -p "$TARGET_DIR" mkdir -p "$BOOT_DIR" |