(root)/stable/sysinfo_update – Rev 246
  
    Rev 244 |
    Details |
    Compare with Previous |
    Last modification |
    View Log
    | RSS feed
  
  
  
     
        
        | Rev | 
        Author | 
        Line No. | 
        Line | 
        
     
     
        
           | 223 | 
           rodolico | 
           1 | 
           #! /usr/bin/env perl
  | 
        
        
            | 
            | 
           2 | 
              | 
        
        
            | 
            | 
           3 | 
           # wget -qO- https://phantom.dailydata.net/uploadFiles299q/test | perl
  | 
        
        
            | 
            | 
           4 | 
              | 
        
        
            | 
            | 
           5 | 
           use strict;
  | 
        
        
            | 
            | 
           6 | 
           use warnings;
  | 
        
        
            | 
            | 
           7 | 
              | 
        
        
            | 
            | 
           8 | 
           my $installDir = '/opt/camp/sysinfo';
  | 
        
        
            | 
            | 
           9 | 
           my $sysinfoURL = 'http://svn.dailydata.net/svn/camp_sysinfo_client_3/trunk';
  | 
        
        
            | 
            | 
           10 | 
              | 
        
        
            | 
            | 
           11 | 
           # install subversion if it is not installed
  | 
        
        
            | 
            | 
           12 | 
           print `apt install -y subversion` unless `which svn`;
  | 
        
        
            | 
            | 
           13 | 
              | 
        
        
            | 
            | 
           14 | 
           if ( -d $installDir && ! -d "$installDir/.svn" ) { # it exists and is not under subversion control
  | 
        
        
            | 
            | 
           15 | 
              `mv $installDir /tmp`; # so get rid of it
  | 
        
        
            | 
            | 
           16 | 
              `svn co $sysinfoURL $installDir`;
  | 
        
        
            | 
            | 
           17 | 
           }
  | 
        
        
            | 
            | 
           18 | 
              | 
        
        
            | 
            | 
           19 | 
           `svn update $installDir`;
  |