Private
Server IP : 195.201.23.43  /  Your IP : 13.58.187.29
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/bin/update-devel
#!/usr/bin/env perl
# update-devel - Update Webmin/Usermin and/or Authentic Theme from Git, with latest unstable, development version.

use strict;
use warnings;

use 5.010;

use Getopt::Long qw(:config permute pass_through);
use Pod::Usage;
use Term::ANSIColor qw(:constants);
use File::Basename;
use Cwd qw(cwd);

my %opt;
GetOptions('help|h'      => \$opt{'help'},
           'product|p=s' => \$opt{'product'},
           'theme|t:s'   => \$opt{'theme'});
pod2usage(0) if ($opt{'help'} || !$opt{'product'});

# Get current path
my $path = cwd;

# Check Webmin lib
my $lib = "web-lib-funcs.pl";
if (!-r "$path/$lib") {
    $path = dirname(dirname($0));
    if (!-r "$path/$lib") {
        $path = $path = Cwd::realpath('..');
    }
}

# Run actual update or throw an error
my $p = $opt{'product'};

if ($p =~ /^webmin$|^usermin$/i) {
    if ($p =~ /^usermin$/i) {
        $path =~ s/webmin/$p/;
    }
    my $cmd = "cd $path && ./update-from-repo.sh -force";
    if (defined($opt{'theme'})) {
        my $tver = $opt{'theme'} ? " -release:$opt{'theme'}" : "";
        $cmd = "cd $path/authentic-theme && ./theme-update.sh$tver -force";
    } 
    system($cmd);
} else {
    say RED, "Unknow product name: $p", RESET;
    exit 0;
}

=pod

=head1 NAME

update-devel

=head1 DESCRIPTION

Update Webmin/Usermin and/or Authentic Theme from Git, with latest unstable, development version.

=head1 SYNOPSIS

update-devel [options] --product <webmin|usermin> [--theme]

=head1 OPTIONS

=over

=item --product, -p

Specify product name to update, like "webmin" or "usermin".

=item --theme, -t

If set, only Authentic Theme will be updated for specified product

=item --help, -h

=back
Private