Created
March 6, 2019 08:11
-
-
Save zhaozzq/69fcffed511c4e078dbddfe32a249697 to your computer and use it in GitHub Desktop.
SourceTree Custom Action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#仓库路径 | |
REPO_PATH=$1 | |
#文件的类型 | |
# OPEN_TYPE=$2 | |
LIST=`find "$REPO_PATH" -name "*.xcworkspace" | grep -v ".xcodeproj/project.xcworkspace"` | |
if [ -z "$LIST" ] ; then | |
LIST=`find "$REPO_PATH" -name "*.xcodeproj" | grep -v "Pods.xcodeproj"` | |
fi | |
#判断打开项目文件的类型,根据类型筛选出项目文件路径 | |
# if [ $OPEN_TYPE = "xcodeproj" ]; then | |
# LIST=`find "$REPO_PATH" -name "*.xcodeproj" | grep -v "Pods.xcodeproj"` | |
# else | |
# LIST=`find "$REPO_PATH" -name "*.xcworkspace" | grep -v ".xcodeproj/project.xcworkspace"` | |
# fi | |
echo "$LIST" | while read i | |
do | |
open "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script to run: /bin/bash
Parameters: /Path/open_xcode_project.sh $REPO