Created
September 14, 2017 15:40
-
-
Save songxing10000/47c9f8436fea8674623e184892d3e1aa to your computer and use it in GitHub Desktop.
uploadIpaToServerUseSSH
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
set appName to "Terminal" | |
set appID to bundle identifier of (info for (path to application appName)) | |
set theFolder to choose folder | |
tell application "Finder" | |
set fileList to every file of theFolder --whose name extension is "ipa" | |
if (count of fileList) > 0 then | |
repeat with theFile in fileList | |
set fileName to name of theFile | |
tell application "Terminal" | |
if it is not running then | |
activate | |
end if | |
end tell | |
tell application "System Events" | |
tell application process "Terminal" | |
tell application "System Events" | |
set visible of process appName to true | |
set frontmost of process appName to true | |
end tell | |
keystroke "1" using command down | |
delay 1 | |
keystroke fileName | |
keystroke return | |
end tell | |
end tell | |
end repeat | |
else | |
set alertTitle to "当前目录没有找到ipa文件" | |
set okBtnName to "好的,我再找找" | |
display dialog alertTitle buttons {okBtnName} default button okBtnName | |
end if | |
end tell | |
--tell application "Terminal" | |
--activate | |
--do script "ssh [email protected]" | |
-- // write user's password | |
-- // write some linux commands to remote server | |
--end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment