|
Last change
on this file since 36391 was 36380, checked in by stoecker, 11 months ago |
|
handle softlinks
|
-
Property svn:executable
set to
*
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | #!/usr/bin/perl
|
|---|
| 2 |
|
|---|
| 3 | use strict;
|
|---|
| 4 | use Cwd;
|
|---|
| 5 |
|
|---|
| 6 | open(my $file, '<', 'github_plugins') or die;
|
|---|
| 7 |
|
|---|
| 8 | if(($ARGV[0]||'') eq 'checkout')
|
|---|
| 9 | {
|
|---|
| 10 | for my $plugin (<$file>)
|
|---|
| 11 | {
|
|---|
| 12 | chomp($plugin);
|
|---|
| 13 | system('git','clone',"https://github.com/JOSM/$plugin");
|
|---|
| 14 | }
|
|---|
| 15 | }
|
|---|
| 16 | elsif(($ARGV[0]||'') eq 'status')
|
|---|
| 17 | {
|
|---|
| 18 | my $dir = cwd();
|
|---|
| 19 | for my $plugin (<$file>)
|
|---|
| 20 | {
|
|---|
| 21 | print($plugin);
|
|---|
| 22 | chomp($plugin);
|
|---|
| 23 | chdir($plugin);
|
|---|
| 24 | system('git','status');
|
|---|
| 25 | chdir($dir);
|
|---|
| 26 | }
|
|---|
| 27 | }
|
|---|
| 28 | elsif(($ARGV[0]||'') eq 'reset')
|
|---|
| 29 | {
|
|---|
| 30 | my $dir = cwd();
|
|---|
| 31 | for my $plugin (<$file>)
|
|---|
| 32 | {
|
|---|
| 33 | print($plugin);
|
|---|
| 34 | chomp($plugin);
|
|---|
| 35 | chdir($plugin);
|
|---|
| 36 | system('git','reset','--hard','HEAD');
|
|---|
| 37 | system('git','pull');
|
|---|
| 38 | chdir($dir);
|
|---|
| 39 | }
|
|---|
| 40 | }
|
|---|
| 41 | elsif(($ARGV[0]||'') eq 'i18nupdate')
|
|---|
| 42 | {
|
|---|
| 43 | my $dir = cwd();
|
|---|
| 44 | for my $plugin (<$file>)
|
|---|
| 45 | {
|
|---|
| 46 | print($plugin);
|
|---|
| 47 | chomp($plugin);
|
|---|
| 48 | chdir($plugin);
|
|---|
| 49 | my $p = Cwd::abs_path('data');
|
|---|
| 50 | for my $file (glob "$p/*.lang")
|
|---|
| 51 | {
|
|---|
| 52 | system('git','add',$file);
|
|---|
| 53 | system('git','add',$file);
|
|---|
| 54 | }
|
|---|
| 55 | system('git','commit','-m','I18n update');
|
|---|
| 56 | system('git','remote','set-url','origin',"git\@github.com:JOSM/$plugin.git");
|
|---|
| 57 | system('git','push');
|
|---|
| 58 | chdir($dir);
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | }
|
|---|
| 62 | else
|
|---|
| 63 | {
|
|---|
| 64 | my $dir = cwd();
|
|---|
| 65 | for my $plugin (<$file>)
|
|---|
| 66 | {
|
|---|
| 67 | print($plugin);
|
|---|
| 68 | chomp($plugin);
|
|---|
| 69 | chdir($plugin);
|
|---|
| 70 | system('git','pull');
|
|---|
| 71 | chdir($dir);
|
|---|
| 72 | }
|
|---|
| 73 | }
|
|---|
| 74 | close($file);
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.