| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
| X-Recipient: | geda-user AT delorie DOT com |
| X-Mailer: | exmh version 2.8.0 04/21/2012 with nmh-1.7+dev |
| X-Exmh-Isig-CompType: | repl |
| X-Exmh-Isig-Folder: | inbox |
| From: | "karl AT aspodata DOT se [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
| To: | geda-user AT delorie DOT com |
| Subject: | Re: [geda-user] lepton-sch2pcb: wrong ${prefix} for pcb |
| In-reply-to: | <20230330064204.16FA585F72C3@turkos.aspodata.se> |
| References: | <20230330032511 DOT 12329 DOT qmail AT stuge DOT se> <20230330064204 DOT 16FA585F72C3 AT turkos DOT aspodata DOT se> |
| Comments: | In-reply-to "karl AT aspodata DOT se [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
| message dated "Thu, 30 Mar 2023 08:42:04 +0200." | |
| Mime-Version: | 1.0 |
| Message-Id: | <20230330094235.0D69785F72C3@turkos.aspodata.se> |
| Date: | Thu, 30 Mar 2023 11:42:35 +0200 (CEST) |
| X-Virus-Scanned: | ClamAV using ClamSMTP |
| Reply-To: | geda-user AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | geda-user AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
This is a multipart MIME message.
--==_Exmh_1680169332_3450
Content-Type: text/plain
Slightly better patch:
Instead of:
$ pcb --show-libdir
/home/local/bin/../share/pcb
I get:
$ pcb --show-libdir
/home/local/share/pcb
Regards,
/Karl Hammar
--==_Exmh_1680169332_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_1680169332_3450--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |