Mail Archives: geda-user/2023/03/31/05:15:09
This is a multipart MIME message.
--==_Exmh_1680252897_3450
Content-Type: text/plain; charset="utf-8"
Hello pcb devs,
to be able to do runtime detection of pcb share'd dir,
I'd request attatched patch to be applied to pcb sources.
Regards,
/Karl Hammar
--==_Exmh_1680252897_3450
Content-Type: text/plain; charset="utf-8" ; name="patch"
Content-Description: patch
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="patch"
diff --git a/src/main.c b/src/main.c
index a4646a39..eb337db8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1685,6 +1685,13 @@ print_version ()
exit (0);
}
=
+static void
+print_libdir ()
+{
+ printf ("%s\n", lrealpath(pcblibdir));
+ exit (0);
+}
+
/* ---------------------------------------------------------------------=
-
* Figure out the canonical name of the executed program
* and fix up the defaults for various paths
@@ -2035,6 +2042,8 @@ main (int argc, char *argv[])
usage ();
if (argc > 1 && strcmp (argv[1], "-V") =3D=3D 0)
print_version ();
+ if (argc > 1 && strcmp (argv[1], "--show-libdir") =3D=3D 0)
+ print_libdir ();
/* Export pcb from command line if requested. */
if (argc > 1 && strcmp (argv[1], "-p") =3D=3D 0)
{
--==_Exmh_1680252897_3450--
- Raw text -