Advertisement
Guest User

preinstall chrome jamf

a guest
Nov 17th, 2022
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.54 KB | Source Code | 0 0
  1. #!/bin/bash
  2. isChromePresent() {
  3.     local CHROME_PATH="/Applications/Google Chrome.app"
  4.  
  5.     if  [[ -e $CHROME_PATH ]]
  6.       then
  7.             return 1
  8.         else
  9.             return 0
  10.     fi
  11. }
  12.  
  13. isChromePresent
  14. C_VAL=$? # assigning the return value
  15.  
  16. # checking for chrome
  17. if [[ "$C_VAL" == 0 ]]
  18.     then
  19.     echo "chrome is not present"
  20. fi
  21.  
  22. Status() {
  23.     EXIT_CODE=0 # 0 means success in Bash Script
  24.  
  25.     if [[ "$C_VAL" == 0 ]]
  26.         then
  27.             EXIT_CODE=1
  28.     fi
  29.     return $EXIT_CODE
  30. }
  31.  
  32. Status
  33. FINAL=$?
  34. exit $FINAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement