Jawap
Jawap

Reputation: 2543

Run bash command in CocoaPods post_install step

I would like to make CocoaPods run git submodule init in the project root directory after it's done installing the pods. There is a post_install hook, but I found very little information about how to use it. Can it be used to run arbitrary bash commands?

Upvotes: 25

Views: 6894

Answers (1)

Jawap
Jawap

Reputation: 2543

Well, that was easier than expected...

post_install do |installer|
  system("git submodule init")
end

Upvotes: 46

Related Questions