Merge remote-tracking branch 'origin/new/bug_7178'
[koha.git] / C4 / SIP / example_institution_dump.sh
index 3aa32f3..3837e75 100755 (executable)
@@ -1,3 +1,16 @@
 #!/bin/bash
 
-perl -I ./ -e 'use Data::Dumper; use ILS; use Sip::Configuration; $conf=Sip::Configuration->new("SIPconfig.xml");  print Dumper($conf->{institutions}->{"MAIN"}),"\n";'
+perl -I ./ -e '
+use Data::Dumper;
+use ILS;
+use Sip::Configuration;
+my $code = "MAIN";
+my $conf = Sip::Configuration->new("SIPconfig.xml");
+my $ils  = ILS->new($conf->{institutions}->{$code});
+print "XML for $code: ", Dumper($conf->{institutions}->{$code}), "\n";
+print "ILS for $code: ", Dumper($ils), "\n";
+print "\$ils->checkout_ok(): ", ($ils->checkout_ok() ? "Y" : "N"), "\n";
+print "\$ils->checkin_ok() : ", ($ils->checkin_ok()  ? "Y" : "N"), "\n";
+print "\$ils->offline_ok() : ", ($ils->offline_ok()  ? "Y" : "N"), "\n";
+print "\n";
+'