Skip to content

Commit

Permalink
#1 check xcode environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Dubkov committed Aug 30, 2021
1 parent 5e9ff3c commit 362f724
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
21 changes: 17 additions & 4 deletions doctor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ if [ $studio_jdk_set -eq 1 ];
## CHECK COCOA PODS:
########

printf "Checking COCOA: \n"
printf "\nChecking COCOA: \n"
pod_found=$(type pod | grep "not found")
if [ -z "$pod_found" ];
then
Expand All @@ -138,12 +138,25 @@ else
installed_correctly=0
fi

#######
## CHECK XCODE ENVIRONMENT:
########
xcode_setup_env_path=~/.moko-doctor/sh/setup_xcode_environment.sh
xcode_setup_env_local_path=./setup_xcode_environment.sh
if [ -e "$xcode_setup_env_path" ] || [ -e "$xcode_setup_env_local_path" ]; then
printf "\nChecking Xcode Environment: \n"
if [ -e "$xcode_setup_env_path" ]; then
sh $xcode_setup_env_path
elif [ -e "$xcode_setup_env_local_path" ]; then
sh $xcode_setup_env_local_path
fi
fi



if [ $installed_correctly -eq 1 ];
then
printf "\nAll parameters are set correctly! =)\n"
else
printf "\n Something is installed incorrectly, look https://codelabs.kmp.icerock.dev/codelabs/kmm-icerock-onboarding-1-ru/index.html#0\n"
fi



3 changes: 2 additions & 1 deletion setup_xcode_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo "To make the changes take effect, reboot the system!"
out=$(launchctl list | grep $launch_name)
if [ -f $file_path ]
then
echo "LaunchAgent is installed:"
echo "[+] LaunchAgent is installed:"
echo $out
current_java=`(cat $file_path | grep 'jdk' | sed 's/<string>*//' | sed 's/ *<\/string>/ /' | sed 's/\t//' | sed 's/\t//' | sed 's/ *$//')`
echo " - JAVA_HOME: $current_java"
Expand All @@ -65,6 +65,7 @@ then
fi

else
echo "[-] LaunchAgent is not installed:"
java_path=""
android_sdk_path=""
if [ $JAVA_HOME ]
Expand Down

0 comments on commit 362f724

Please sign in to comment.