Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- isChromePresent() {
- local CHROME_PATH="/Applications/Google Chrome.app"
- if [[ -e $CHROME_PATH ]]
- then
- return 1
- else
- return 0
- fi
- }
- isChromePresent
- C_VAL=$? # assigning the return value
- # checking for chrome
- if [[ "$C_VAL" == 0 ]]
- then
- echo "chrome is not present"
- fi
- Status() {
- EXIT_CODE=0 # 0 means success in Bash Script
- if [[ "$C_VAL" == 0 ]]
- then
- EXIT_CODE=1
- fi
- return $EXIT_CODE
- }
- Status
- FINAL=$?
- exit $FINAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement