mk-vmimage.sh (1ca8842f3ad9725863c9affc044d1974a51818a9) | mk-vmimage.sh (89585511cc052643a774f64f6450d18e7dd51d4a) |
---|---|
1#!/bin/sh 2#- 3# Copyright (c) 2014, 2015 The FreeBSD Foundation 4# All rights reserved. 5# 6# This software was developed by Glen Barber under sponsorship 7# from the FreeBSD Foundation. 8# --- 27 unchanged lines hidden (view full) --- 36 echo "${0} usage:" 37 echo "${@}" 38 return 1 39} 40 41main() { 42 local arg 43 VMCONFIG="/dev/null" | 1#!/bin/sh 2#- 3# Copyright (c) 2014, 2015 The FreeBSD Foundation 4# All rights reserved. 5# 6# This software was developed by Glen Barber under sponsorship 7# from the FreeBSD Foundation. 8# --- 27 unchanged lines hidden (view full) --- 36 echo "${0} usage:" 37 echo "${@}" 38 return 1 39} 40 41main() { 42 local arg 43 VMCONFIG="/dev/null" |
44 while getopts "C:c:d:f:i:o:s:S:" arg; do | 44 while getopts "C:c:d:F:f:i:o:s:S:" arg; do |
45 case "${arg}" in 46 C) 47 VMBUILDCONF="${OPTARG}" 48 ;; 49 c) 50 VMCONFIG="${OPTARG}" 51 ;; 52 d) 53 DESTDIR="${OPTARG}" 54 ;; | 45 case "${arg}" in 46 C) 47 VMBUILDCONF="${OPTARG}" 48 ;; 49 c) 50 VMCONFIG="${OPTARG}" 51 ;; 52 d) 53 DESTDIR="${OPTARG}" 54 ;; |
55 F) 56 VMFS="${OPTARG}" 57 ;; |
|
55 f) 56 VMFORMAT="${OPTARG}" 57 ;; 58 i) 59 VMBASE="${OPTARG}" 60 ;; 61 o) 62 VMIMAGE="${OPTARG}" --- 9 unchanged lines hidden (view full) --- 72 esac 73 done 74 shift $(( ${OPTIND} - 1)) 75 76 if [ -z "${VMBASE}" -o \ 77 -z "${WORLDDIR}" -o \ 78 -z "${DESTDIR}" -o \ 79 -z "${VMSIZE}" -o \ | 58 f) 59 VMFORMAT="${OPTARG}" 60 ;; 61 i) 62 VMBASE="${OPTARG}" 63 ;; 64 o) 65 VMIMAGE="${OPTARG}" --- 9 unchanged lines hidden (view full) --- 75 esac 76 done 77 shift $(( ${OPTIND} - 1)) 78 79 if [ -z "${VMBASE}" -o \ 80 -z "${WORLDDIR}" -o \ 81 -z "${DESTDIR}" -o \ 82 -z "${VMSIZE}" -o \ |
80 -z "${VMIMAGE}" ]; | 83 -z "${VMIMAGE}" -o \ 84 -z "${VMFS}" ]; |
81 then 82 usage || exit 0 83 fi 84 85 if [ -z "${VMBUILDCONF}" ] || [ ! -e "${VMBUILDCONF}" ]; then 86 echo "Must provide the path to vmimage.subr." 87 return 1 88 fi --- 24 unchanged lines hidden --- | 85 then 86 usage || exit 0 87 fi 88 89 if [ -z "${VMBUILDCONF}" ] || [ ! -e "${VMBUILDCONF}" ]; then 90 echo "Must provide the path to vmimage.subr." 91 return 1 92 fi --- 24 unchanged lines hidden --- |