Skip to content

Instantly share code, notes, and snippets.

@ElectricCoffee
Last active November 9, 2022 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElectricCoffee/ed4f241874aaf4db491b90b901d8a48e to your computer and use it in GitHub Desktop.
Save ElectricCoffee/ed4f241874aaf4db491b90b901d8a48e to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use 5.30.0;
use warnings;
use Cwd 'getcwd';
use File::Basename;
my $dir = getcwd;
my ($name) = File::Basename::fileparse($dir);
sub update {
system 'pod install';
exit;
}
if ($name eq 'ios') {
update;
}
if (-d "$dir/ios") {
chdir 'ios';
update;
}
print STDERR <<END;
The folder "$dir" is not a project ios folder, nor does it have one as its immediate child!
Are you sure you're in the right place?"
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment