-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zlfyuan
committed
Dec 16, 2020
1 parent
2418571
commit bcd3a40
Showing
3 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
# iOSNote | ||
<!-- | ||
* @Author: zluof | ||
* @Date: 2020-12-16 16:33:38 | ||
* @LastEditTime: 2020-12-16 16:48:38 | ||
* @LastEditors: zluof | ||
* @Description: | ||
* @FilePath: /undefined/Users/zhongxiaoxi/Desktop/testc/iOSNote/README.md | ||
--> | ||
# iOSNote | ||
|
||
# xcode_commadline 支持在终端打开iOS/Mac的项目 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
### | ||
# @Author: zluof | ||
# @Date: 2020-08-17 11:28:45 | ||
# @LastEditTime: 2020-12-16 16:22:11 | ||
# @LastEditors: zluof | ||
# @Description: | ||
# @FilePath: /undefined/Users/zhongxiaoxi/Desktop/testc/testc.sh | ||
### | ||
|
||
root=$1 | ||
|
||
if [ ${#root} -eq 0 ] | ||
then | ||
echo `没有找到项目路径` | ||
exit | ||
else | ||
root=$1 | ||
fi | ||
space="true" | ||
# echo $root | ||
pod_xcodeproj="/Pods/Pods.xcodeproj" | ||
for filename in `find "$root" -name "*.xcodeproj"` | ||
do | ||
# echo $filename | ||
if [[ $filename =~ $pod_xcodeproj ]]; | ||
then | ||
# 打开xcworkspace | ||
# echo $filename | ||
# echo `open *.xcworkspace` | ||
space="true" | ||
else | ||
# 打开xcodeproj | ||
# echo $filename | ||
space="false" | ||
file="$filename" | ||
# echo `open *.xcodeproj` | ||
fi | ||
done | ||
# echo $space | ||
if [ $space == "true" ]; | ||
then | ||
for xcworkspace in `find "$root" -name "*.xcworkspace"` | ||
do | ||
# echo $xcworkspace | ||
file="$xcworkspace" | ||
done | ||
echo `open $file` | ||
else | ||
echo `open $file` | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
### | ||
# @Author: zluof | ||
# @Date: 2020-08-17 11:28:45 | ||
# @LastEditTime: 2020-12-16 16:22:11 | ||
# @LastEditors: zluof | ||
# @Description: | ||
# @FilePath: /undefined/Users/zhongxiaoxi/Desktop/testc/testc.sh | ||
### | ||
|
||
root=$1 | ||
|
||
if [ ${#root} -eq 0 ] | ||
then | ||
echo `没有找到项目路径` | ||
exit | ||
else | ||
root=$1 | ||
fi | ||
space="true" | ||
# echo $root | ||
pod_xcodeproj="/Pods/Pods.xcodeproj" | ||
for filename in `find "$root" -name "*.xcodeproj"` | ||
do | ||
# echo $filename | ||
if [[ $filename =~ $pod_xcodeproj ]]; | ||
then | ||
# 打开xcworkspace | ||
# echo $filename | ||
# echo `open *.xcworkspace` | ||
space="true" | ||
else | ||
# 打开xcodeproj | ||
# echo $filename | ||
space="false" | ||
file="$filename" | ||
# echo `open *.xcodeproj` | ||
fi | ||
done | ||
# echo $space | ||
if [ $space == "true" ]; | ||
then | ||
for xcworkspace in `find "$root" -name "*.xcworkspace"` | ||
do | ||
# echo $xcworkspace | ||
file="$xcworkspace" | ||
done | ||
echo `open $file` | ||
else | ||
echo `open $file` | ||
fi |