Commit 755951f0 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

install: add favicon and remove old badges

parent c3e194bc
......@@ -30,7 +30,7 @@ my %DIR = (
,'etc/systemd/' => 'lib/systemd/system/'
);
for ( qw(css fallback fonts img js )) {
for ( qw(css fallback fonts img js favicon.ico )) {
$DIR{"public/$_"} = "usr/share/ravada/public";
}
......
......@@ -63,8 +63,23 @@ sub get_version_badge {
,"../img/version-$VERSION-brightgreen.svg");
}
sub remove_old_version_badge {
$VERSION =~ s/-/--/;
my $current = "version-$VERSION-brightgreen.svg";
opendir my $dir,"public/img" or die "$! public/img";
while (my $file = readdir $dir) {
next if $file !~ /^version-.*\.svg/;
next if $file eq $current;
$file = "public/img/$file";
unlink $file or die "$! $file";
}
closedir $dir;
}
#############################################################################
remove_old_version_badge();
get_version_badge();
open my $in,'<',$FILE_CONFIG or die "$! $FILE_CONFIG";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment