-
Notifications
You must be signed in to change notification settings - Fork 28
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
1 parent
619e9c1
commit 3f62a38
Showing
5 changed files
with
36 additions
and
6 deletions.
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
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
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
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 |
---|---|---|
|
@@ -24,4 +24,4 @@ if [ $? -ne 0 ]; then | |
exit 1 | ||
else | ||
echo "应用程序执行成功。" | ||
fi | ||
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,30 @@ | ||
#!/bin/bash | ||
|
||
# 获取脚本所在目录 | ||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
# 应用程序名称 | ||
APP_NAME="MDriveSync.Client.API" | ||
|
||
# 检查应用程序文件是否存在 | ||
if [ ! -f "$DIR/$APP_NAME" ]; then | ||
echo "错误:应用程序文件 $DIR/$APP_NAME 不存在。" | ||
exit 1 | ||
fi | ||
|
||
# 移除应用程序的隔离属性 | ||
xattr -d com.apple.quarantine "$DIR/$APP_NAME" | ||
|
||
# 赋予应用程序执行权限 | ||
chmod +x "$DIR/$APP_NAME" | ||
|
||
# 执行应用程序 | ||
"$DIR/$APP_NAME" | ||
|
||
# 检查应用程序退出状态 | ||
if [ $? -ne 0 ]; then | ||
echo "错误:应用程序执行失败。" | ||
exit 1 | ||
else | ||
echo "应用程序执行成功。" | ||
fi |