From 48f1a0f6fd3ee239714c6f4c71efcb31356daedc Mon Sep 17 00:00:00 2001 From: Paul M Date: Fri, 12 Aug 2022 11:16:25 -0500 Subject: [PATCH] clean up and a bug fix --- mods | Bin 558 -> 558 bytes update.pl | 27 +++++---------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/mods b/mods index 973cc37c8ef291243c920f19439b1e1b24b8b937..d1827032f400e12aa24bd7717b85f3f67ec0bd60 100644 GIT binary patch delta 175 zcmZ3-vW{hfggmPV0|SGHW3Y#YL4~QAfuVu9Wr~4Gl7%J#8}hG4;b}$ zn3;eAT}2u1D;VX4`GNeT#Ny24_}s*j)S}G9oZ^XcjuS6isxoC2umL3#OG`5H zi@;hejoE<$MX5QdiN&cPgEEaLFJZKqI7vj6#oWZg0!bERZ$V~3YI%N9b}(6H7}n@{5>&tW4vH=1#0E<|Y;v6JN;l zf~+dYEJ!WSFUl^Sypz#p;yOJApjd8xN-?Vlkm2DN?4e;$VQOYzWSU}Pl4_D{"mods"}}) { # the fing arrow -> sigh could have saved so much time print "Checking mod $key \n"; @@ -37,10 +32,8 @@ foreach my $key (keys %{ $conf->{"mods"}}) { # the fing arrow -> sigh could have chomp($author2); chomp($release2); - #print "Current release $release2 author $author2 installed ". $conf->{"mods"}{$key}{"release"} ." \n"; - - if ($conf->{"mods"}{$key}{"release"} != $release2) { - print "Mod $key current release: " . $release2 . " installed: " . $conf{"mods"}{$key}{"release"} ."!\n"; + if ($conf->{"mods"}{$key}{"release"} != $release2) { + print "Mod $key current release: " . $release2 . " installed: " . $conf->{"mods"}{$key}{"release"} ."!\n"; }else{ print "Mod $key up to date\n"; } @@ -58,14 +51,12 @@ foreach(@mods){ next; } # At this point we should have a mod's name - #print "Mod name $tmname\n"; $author = `jq -c '.[] | select(.name =="$tmname") | .author' index.json`; #jq is a time saver $author =~ s/\"//g; chomp($author); $release = `jq -c '.[] | select(.name =="$tmname") | .release' index.json`; $release =~ s/\"//g; chomp($release); - #print "$author\n"; $conf{"mods"}{$tmname}{"author"} = $author; $conf{"mods"}{$tmname}{"release"} = $release; } @@ -87,16 +78,8 @@ if (-e "mods"){ # load data print "Loading data\n"; $conf = retrieve('mods'); - #print "Saved...\n"; - #print Dumper($conf2); - #print "Freash...\n"; - #get_ready(); - #print Dumper($conf); chk_update(); }else{ get_ready(); - chk_update(); -} - -#get_ready(); - + #chk_update(); +} \ No newline at end of file