Skip to content

Commit

Permalink
install: add favicon and remove old badges
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Apr 22, 2021
1 parent c3e194b commit 755951f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deb/debianize.pl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
,'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";
}

Expand Down
15 changes: 15 additions & 0 deletions etc/get_fallback.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 755951f

Please sign in to comment.