get_mac_crd_version.sh 1.0 KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. # Copyright (c) 2012 The Chromium Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. ME2ME_HOST="/Library/PrivilegedHelperTools/ChromeRemoteDesktopHost.bundle"
  6. UNINSTALLER_CHROME="/Applications/Chrome Remote Desktop Host Uninstaller.app"
  7. UNINSTALLER_CHROMIUM="/Applications/Chromoting Host Uninstaller.app"
  8. KEYSTONE="/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle"
  9. INFO_PLIST="Contents/Info.plist"
  10. set -e -u
  11. function print_plist_version {
  12. local name="${1}"
  13. local file="${2}"
  14. if [[ -e "${file}/${INFO_PLIST}" ]]; then
  15. set `PlistBuddy -c 'Print CFBundleVersion' "${file}/${INFO_PLIST}"`
  16. echo "${name}: version = ${1}"
  17. else
  18. echo "${name}: plist doesn't exist"
  19. fi
  20. }
  21. print_plist_version "Me2me host" "${ME2ME_HOST}"
  22. print_plist_version "Chrome Remote Desktop Host Uninstaller" "${UNINSTALLER_CHROME}"
  23. print_plist_version "Chromoting Host Uninstaller" "${UNINSTALLER_CHROMIUM}"
  24. print_plist_version "Keystone" "${KEYSTONE}"