Source

schemingmind_tuning / install_extension.pl

Full commit
Marcin Kasperski 182585c 
Marcin Kasperski 7555dc4 

Marcin Kasperski d5fa887 
Marcin Kasperski 3eb55bd 
Marcin Kasperski 7555dc4 
Marcin Kasperski 182585c 



Marcin Kasperski d5fa887 

















Marcin Kasperski 16b697b 
Marcin Kasperski 182585c 
Marcin Kasperski d5fa887 
Marcin Kasperski 98ad539 
Marcin Kasperski 182585c 
Marcin Kasperski d5fa887 


Marcin Kasperski 16b697b 


Marcin Kasperski d5fa887 


Marcin Kasperski c6e50d3 
#!/usr/bin/perl -w
# -*- coding: utf-8 -*-

# Wrzuca po prostu najnowszą wersję. Nadawanie numerka wersji
# itp jest w build_extension.

use strict;
use FindBin;
use File::Spec::Functions;

chdir $FindBin::Bin or die "chdir: $!\n";

my @newest = (0,0,0);
open(F, "hg tags|");
while(<F>) {
    if(/^(\d+)\.(\d+)\.(\d+)\b/) {
        if( $1 > $newest[0]
              || ($1 == $newest[0]
                    && ($2 > $newest[1]
                          || ($2 == $newest[1] && $3 > $newest[2])))) {
            @newest = ($1, $2, $3);
        }
    }
}
close(F);
my $version = join('.', @newest);

my $XPI_NAME = "smtuning-$version.xpi";
my $RDF_NAME = "update-$version.rdf";
my $EXT_DIR = "$FindBin::Bin/smtuning";
my $XPI_FILE = catfile($FindBin::Bin, $XPI_NAME);
my $RDF_FILE = catfile($FindBin::Bin, $RDF_NAME);

unless (-f $XPI_FILE) {
    die "$XPI_FILE not found. Not built?\n";
}
unless (-f $RDF_FILE) {
    die "$RDF_FILE not found. Not built?\n";
}

print "Installing $version\n";

system("scp $XPI_FILE $RDF_FILE linode.mekk.waw.pl:");
system("ssh linode.mekk.waw.pl 'mv $XPI_NAME $RDF_NAME www_download/smtuning/; cd www_download/smtuning/; ln -sf $XPI_NAME smtuning.xpi; ln -sf $RDF_NAME update.rdf'");