/usr/share/kconf_update/katomic-levelset-upd.pl is in katomic 4:16.08.1-1+b1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #!/usr/bin/perl -w
use File::Path qw(make_path);
# WAS:
# in katomicrc
#
# [Highscores_user]
# Level_1=15
#
# NOW:
# in $DATA_DIR/highscores:
#
# [Highscores_user][default_levels]
# Level1=15
my $prefix=`kde4-config --localprefix`;
chomp $prefix;
if(length($prefix) > 0)
{
my $highscore_dir="$prefix/share/apps/katomic/";
if(not -d $highscore_dir)
{
make_path($highscore_dir) or die $!;
}
open FILE, ">$highscore_dir/highscores" or die $!;
my $firstHsGroup = 1;
while( <> )
{
my $line = $_;
chomp $line;
if($line =~ /\[Highscores_/)
{
if(not $firstHsGroup)
{
print FILE "\n";
}
print FILE "$line\[default_levels\]\n";
$firstHsGroup = 0;
# make kconf_update delete group from rc file
print "# DELETEGROUP $line\n";
}
elsif($line =~ /Level_([0-9]+)=([0-9]+)/)
{
print FILE "Level$1=$2\n";
}
}
}
|