diff --git a/deb/debianize.pl b/deb/debianize.pl index dec342554..919e67aaf 100755 --- a/deb/debianize.pl +++ b/deb/debianize.pl @@ -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"; } diff --git a/etc/get_fallback.pl b/etc/get_fallback.pl index 4e278bafc..46cb38efb 100755 --- a/etc/get_fallback.pl +++ b/etc/get_fallback.pl @@ -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";