Changeset 214

Show
Ignore:
Timestamp:
11/08/06 16:59:43 (7 years ago)
Author:
lincoln
Message:

more fixes

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • applications/shepherd

    r213 r214  
    33my $myprogname = 'shepherd'; 
    44my $progname = 'shepherd'; 
    5 my $version = '0.3.11'; 
     5my $version = '0.3.12'; 
    66 
    77# tv_grab_au 
     
    8080my $config_file =   "$CWD/$progname.conf"; 
    8181my $channels_file = "$CWD/channels.conf"; 
    82 my $log_file = "$CWD/$progname.log"; 
     82my $log_file = "$progname.log"; 
    8383 
    8484my $invoked = get_full_path($0); 
     
    278278    &log("Installed $proggy v$latestversion.\n") if ($debug); 
    279279 
     280    $components->{$proggy}->{type} = $progtype; 
     281    $components->{$proggy}->{ver} = $latestversion; 
     282    $components->{$proggy}->{config} = $config; 
     283    $components->{$proggy}->{laststatus} = sprintf "updated to %s on %s", $latestversion, POSIX::strftime("%a%d%b%y",localtime(time)); 
     284 
    280285    # if the update was for the main app, restart it 
    281286    if ($proggy eq $myprogname) { 
     287        $components->{$proggy}->{ready} = 1; 
     288        &write_config_file; 
     289 
    282290        # special case for main app - we create a symlink also 
    283291        unlink("$CWD/tv_grab_au","$CWD/shepherd"); 
     
    292300    } 
    293301 
    294     my $result = test_proggy($proggy, $progtype); 
    295  
    296     $components->{$proggy}->{type} = $progtype; 
    297     $components->{$proggy}->{ver} = $latestversion; 
    298     $components->{$proggy}->{ready} = $result; 
    299     $components->{$proggy}->{config} = $config; 
     302    $components->{$proggy}->{ready} = test_proggy($proggy, $progtype); 
    300303 
    301304    # If this component was disabled automatically, re-enable it. 
     
    306309        enable($proggy); 
    307310    } 
    308  
    309     $components->{$proggy}->{laststatus} = sprintf "updated to %s on %s, not run yet", $latestversion, POSIX::strftime("%a%d%b%y",localtime(time)); 
    310  
    311311} 
    312312 
     
    520520{ 
    521521    return query_component_type('postprocessor'); 
    522 } 
    523  
    524 sub is_app 
    525 { 
    526     my $proggy = shift; 
    527     return ($proggy eq $myprogname ? 1 : 0); 
    528522} 
    529523 
     
    977971    print "Finished configuring.\n\n" . 
    978972          "Shepherd is installed into $CWD.\n\n"; 
    979      
    980     if ($invoked ne "$CWD/$myprogname") 
     973 
     974    if ($invoked ne get_full_path(query_filename('shepherd','application'))) 
    981975    { 
    982976        print "Warning: you invoked this program as $invoked.\n" . 
    983             "In the future, it should be run as $CWD/$myprogname,\n" . 
     977            "In the future, it should be run as ".query_filename('shepherd','application')."\n" . 
    984978            "to avoid constantly re-downloading the latest version.\n\n" . 
    985979            "MythTV users may wish to create the following symlink, by " . 
  • status

    r213 r214  
    1 application     shepherd            0.3.11 
     1application     shepherd            0.3.12 
    22engine          dog                 0.3.2 
    33grabber         yahoo7widget        1.58