summaryrefslogtreecommitdiff
path: root/others/vm3/test.sh
diff options
context:
space:
mode:
authorYour Name <you@example.com>2024-12-23 16:06:31 +0800
committerYour Name <you@example.com>2024-12-23 16:06:31 +0800
commit456f72de0592e801213df04f042f6684ea2cc439 (patch)
tree898a537b1390405225a3a50852f581397fa1b997 /others/vm3/test.sh
parentf7f159a04671690786de2f84e34046c103521d58 (diff)
udpate
Diffstat (limited to 'others/vm3/test.sh')
-rwxr-xr-xothers/vm3/test.sh49
1 files changed, 0 insertions, 49 deletions
diff --git a/others/vm3/test.sh b/others/vm3/test.sh
deleted file mode 100755
index 0dafc23..0000000
--- a/others/vm3/test.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-
-# Default values
-vcpu=2
-ram_gb=4
-disk_gb=20
-
-# Parse named arguments
-while [[ $# -gt 0 ]]; do
- case $1 in
- --vcpu)
- vcpu="$2"
- shift 2
- ;;
- --ram)
- ram_gb="$2"
- shift 2
- ;;
- --disk-size)
- disk_gb="$2"
- shift 2
- ;;
- *)
- # Handle positional arguments (vmname and os)
- if [ -z "$vmname" ]; then
- vmname="$1"
- elif [ -z "$os" ]; then
- os="$1"
- else
- echo "Unknown argument: $1"
- exit 1
- fi
- shift
- ;;
- esac
-done
-
-# Check mandatory arguments
-if [ -z "$vmname" ] || [ -z "$os" ]; then
- echo "Usage: $0 <vm-name> <os> [--vcpu N] [--ram N] [--disk-size N]"
- exit 1
-fi
-
-# Now you can use the variables
-echo "VM Name: $vmname"
-echo "OS: $os"
-echo "VCPU: $vcpu"
-echo "RAM: $ram_gb GB"
-echo "Disk: $disk_gb GB"