Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add single-shot script and makefile with install target #90

Merged
merged 1 commit into from
Jan 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
DESTDIR=/opt/altium2kicad

INSTALL=install

all:

install:
$(INSTALL) -D -m 0755 unpack.pl $(DESTDIR)$(PREFIX)/bin/a2k-unpack
$(INSTALL) -D -m 0755 convertschema.pl $(DESTDIR)$(PREFIX)/bin/a2k-convertschema
$(INSTALL) -D -m 0755 convertpcb.pl $(DESTDIR)$(PREFIX)/bin/a2k-convertpcb
$(INSTALL) -D -m 0755 altium2kicad $(DESTDIR)$(PREFIX)/bin/altium2kicad
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/lib/perl
cp -fr Math $(DESTDIR)$(PREFIX)/lib/perl

15 changes: 15 additions & 0 deletions altium2kicad
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

set -e

if [ -z "$(ls *.PCBDOC)" -a -z "$(ls *.SCHDOC)" ]; then
echo "No altium pcb or schematic files in current working directory!" >&2
exit 1
fi

export PERL5LIB=$PERL5LIB:$(realpath $(dirname $(which $0))/../lib/perl)

a2k-unpack
a2k-convertschema
a2k-convertpcb