source: osm/applications/editors/josm/plugins/github

Last change on this file was 36367, checked in by stoecker, 3 weeks ago

add i18nupdate target

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/usr/bin/perl
2
3use strict;
4use Cwd;
5
6open(my $file, '<', 'github_plugins') or die;
7
8if(($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}
16elsif(($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}
28elsif(($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}
41elsif(($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 for my $file (glob "data/*.lang")
50 {
51 system('git','add',$file);
52 }
53 system('git','commit','-m','I18n update');
54 system('git','remote','set-url','origin',"git\@github.com:JOSM/$plugin.git");
55 system('git','push');
56 chdir($dir);
57 }
58
59}
60else
61{
62 my $dir = cwd();
63 for my $plugin (<$file>)
64 {
65 print($plugin);
66 chomp($plugin);
67 chdir($plugin);
68 system('git','pull');
69 chdir($dir);
70 }
71}
72close($file);
Note: See TracBrowser for help on using the repository browser.