Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CLI apps. For fun and profit
Search
Marin Usalj
May 29, 2014
Programming
16k
4
Share
CLI apps. For fun and profit
Talk given at Cocoa Kucha on #inspect conference, May 2014
Marin Usalj
May 29, 2014
More Decks by Marin Usalj
See All by Marin Usalj
Code signing on iOS/OSX
supermarin
2
500
Launch Arguments - the mysteries
supermarin
1
250
Swift for CLI tools
supermarin
16
25k
CocoaPods intro
supermarin
2
250
Private pods - best practices
supermarin
1
190
Alcatraz internals
supermarin
2
340
ObjectiveSugar & ObjectiveRecord
supermarin
5
590
Alcatraz - Xcode package manager
supermarin
3
340
BubbleWrap
supermarin
3
360
Other Decks in Programming
See All in Programming
Sans tests, vos agents ne sont pas fiables
nabondance
0
160
誰も頼んでない機能を出荷した話
zekutax
0
140
RTSPクライアントを自作してみた話
simotin13
0
210
Claspは野良GASの夢をみるか
takter00
0
130
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
390
Inside Stream API
skrb
1
220
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.2k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
2
390
色即是空、空即是色、データサイエンス
kamoneggi
1
200
AI時代になぜ書くのか
mutsumix
0
460
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
400
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
2.8k
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
220
From π to Pie charts
rasagy
0
190
Making Projects Easy
brettharned
120
6.6k
Designing Experiences People Love
moore
143
24k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Rails Girls Zürich Keynote
gr2m
96
14k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
180
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Paper Plane
katiecoart
PRO
1
50k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Transcript
CLI APPS. FOR FUN AND PROFIT @SUPERMARIN
WHEN FUNCTIONALITY NOT SUPPORTED BY GUI IT'S HARD TO AUTOMATE
TASKS ENDLESS POSSIBILITIES
HOW DO I RUBY, GO, PYTHON, EVEN OBJECTIVE-C
PIPELINE CAT BUILD.LOG | GREP ERROR | WC -L
STATUS CODES $ XCODEBUILD | TEE XCODEBUILD.LOG | XCPRETTY
XCODEBUILD FAILS, STATUS 0
PIPESTATUS [] $ xcodebuild | tee output.log | xcpretty $?
=> 0 ${PIPESTATUS[0]} => 65 ${PIPESTATUS[2]} => 0 $ xcodebuild | tee output.log | xcpretty; exit ${PIPESTATUS[0]}
SET -O PIPEFAIL $ xcodebuild | tee output.log | xcpretty
$ echo $? => 65
BEWARE OF YOUR $SHELL | $SHELL | Exit status |
Pipe status | Set a var | |--------|-------------|---------------|-------------| | bash | $? | $PIPESTATUS | export VAR= | |--------|-------------|---------------|-------------| | zsh | $status | $pipestatus | export VAR= | |--------|-------------|---------------|-------------| | fish | $status | / | set -x VAR |
#! #!/USR/BIN/ENV RUBY
POSIX FLAGS $ COMMAND --VERBOSE --COLOR = $ COMMAND -VC
(ONLY IN SILICON VALLEY)
CLI FRAMEWORKS DON'T DIY
XCPRETTY GITHUB.COM/SUPERMARIN/XCPRETTY
SUCH HTML
WHY IN THE WORLD? THERE'S XCTOOL
XCTOOL(XCODEBUILD) -FLAG -FLAG WRAPPING XCODEBUILD, RECREATING FLAGS
XCODEBUILD -FLAG -FLAG | XCPRETTY USING VANILLA XCODEBUILD
XCTOOL - TESTS maintaining separate settings XCODEBUILD - BETA XCODEBUILD
- APPSTORE maintaining separate settings
USED BY RUBYMOTION FACEBOOK (POP) AFNETWORKING KIWI YAMMER THOUGHTBOT MANY
OTHERS
<3 HIPBYTE YAMMER @KATTRALI