guest_id.sh 991 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash -e
  2. pushd "$(dirname "$0")" >/dev/null
  3. {
  4. cat <<EOF
  5. /*
  6. Copyright (c) 2017 VMware, Inc. All Rights Reserved.
  7. Licensed under the Apache License, Version 2.0 (the "License");
  8. you may not use this file except in compliance with the License.
  9. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. */
  17. package simulator
  18. // GuestID is the list of valid types.VirtualMachineGuestOsIdentifier
  19. var GuestID = []types.VirtualMachineGuestOsIdentifier{
  20. EOF
  21. ids=($(grep 'VirtualMachineGuestOsIdentifier(' ../vim25/types/enum.go | grep = | awk '{print $1}'))
  22. printf "types.%s,\n" "${ids[@]}"
  23. echo "}"
  24. } > guest_id.go
  25. goimports -w guest_id.go