diff --git a/ios/preference_bundle/NIC/control.pl b/ios/preference_bundle/NIC/control.pl new file mode 100644 index 0000000..09e9896 --- /dev/null +++ b/ios/preference_bundle/NIC/control.pl @@ -0,0 +1,26 @@ +my $parent = abs_path(); +my $control = -f "$parent/control" ? "$parent/control" : "$parent/layout/DEBIAN/control"; + +die "Failed to find parent project control file!\n" unless -f $control; + +open my $fh, "<", $control or error "Failed to open $control (read)!\n"; +my @lines = <$fh>; +close $fh; + +my $updated = 0; +for my $line (@lines) { + next unless $line =~ /^Depends:/; + unless ($line =~ /preferenceloader/) { + $line =~ s/$/, preferenceloader/; + $updated = 1; + } +} + +if ($updated) { + open my $out, ">", $control or error "Failed to open $control (write)!\n"; + print $out @lines; + close $out; + print "Added 'preferenceloader' dependency to $control!\n"; +} else { + print "Note: 'preferenceloader' dependency already present or no 'Depends' line found!\n"; +} diff --git a/ios/preference_bundle_swift/NIC/control.pl b/ios/preference_bundle_swift/NIC/control.pl new file mode 100644 index 0000000..09e9896 --- /dev/null +++ b/ios/preference_bundle_swift/NIC/control.pl @@ -0,0 +1,26 @@ +my $parent = abs_path(); +my $control = -f "$parent/control" ? "$parent/control" : "$parent/layout/DEBIAN/control"; + +die "Failed to find parent project control file!\n" unless -f $control; + +open my $fh, "<", $control or error "Failed to open $control (read)!\n"; +my @lines = <$fh>; +close $fh; + +my $updated = 0; +for my $line (@lines) { + next unless $line =~ /^Depends:/; + unless ($line =~ /preferenceloader/) { + $line =~ s/$/, preferenceloader/; + $updated = 1; + } +} + +if ($updated) { + open my $out, ">", $control or error "Failed to open $control (write)!\n"; + print $out @lines; + close $out; + print "Added 'preferenceloader' dependency to $control!\n"; +} else { + print "Note: 'preferenceloader' dependency already present or no 'Depends' line found!\n"; +} diff --git a/iphone_preference_bundle.nic.tar b/iphone_preference_bundle.nic.tar index 77e5257..2aeb8cb 100644 Binary files a/iphone_preference_bundle.nic.tar and b/iphone_preference_bundle.nic.tar differ diff --git a/iphone_preference_bundle_swift.nic.tar b/iphone_preference_bundle_swift.nic.tar index a6eb789..bc67462 100644 Binary files a/iphone_preference_bundle_swift.nic.tar and b/iphone_preference_bundle_swift.nic.tar differ