Skip to content

Commit

Permalink
hosts/linux: Ship mega and itsybitsy install scripts. Fix SNEK_VERSIO…
Browse files Browse the repository at this point in the history
…N in scripts

The scripts all include SNEK_VERSION, which needs to be adjusted to
the current version, so hack the shell script to patch that.

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Jun 8, 2019
1 parent d912f87 commit 5fda633
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions hosts/linux/Makefile
Expand Up @@ -21,10 +21,26 @@ include $(SNEK_ROOT)/snek-install.defs
LINUX_DIST=snek-linux-$(SNEK_VERSION).tar.bz2
LINUX_SH=snek-linux-$(SNEK_VERSION).sh
DESKTOP_FILES=$(SNEK_PORTS)/posix/snek.desktop.in $(SNEK_ROOT)/snekde/snekde.desktop.in
PROGS=$(SNEK_PORTS)/posix/snek $(SNEK_ROOT)/snekde/snekde $(SNEK_PORTS)/snek-duemilanove/snek-duemilanove-install.in

PROGS= \
$(SNEK_PORTS)/posix/snek \
$(SNEK_ROOT)/snekde/snekde \
$(SNEK_PORTS)/duemilanove/snek-duemilanove-install.in \
$(SNEK_PORTS)/itsybitsy5v/snek-itsybitsy-install.in \
$(SNEK_PORTS)/mega/snek-mega-install.in

EXAMPLES=$(SNEK_ROOT)/examples

ICONS=$(SNEK_ROOT)/snek.svg
DOC=$(SNEK_ROOT)/doc/snek.pdf $(SNEK_PORTS)/snek-duemilanove/snek-duemilanove-install.1 $(SNEK_ROOT)/snekde/snekde.1 $(SNEK_ROOT)/COPYING

DOC= \
$(SNEK_ROOT)/doc/snek.pdf \
$(SNEK_ROOT)/snekde/snekde.1 \
$(SNEK_ROOT)/COPYING \
$(SNEK_PORTS)/duemilanove/snek-duemilanove-install.1 \
$(SNEK_PORTS)/itsybitsy5v/snek-itsybitsy-install.1 \
$(SNEK_PORTS)/mega/snek-mega-install.1

LINUX_FILES=$(PROGS) $(DESKTOP_FILES) $(FIRMWARE) $(USBFIRMWARE) $(ICONS) $(DOC) $(EXAMPLES)

all: $(LINUX_SH)
Expand All @@ -33,6 +49,9 @@ $(LINUX_SH): $(LINUX_DIST) linux-install.sh
cat linux-install.sh $(LINUX_DIST) > $@
chmod +x $@

linux-install.sh: linux-install.sh.in
$(SNEK_SED) $^ > $@

$(LINUX_DIST): $(LINUX_FILES) $(LINUX_EXTRA)
-rm -f $@
-rm -rf linux
Expand Down
Expand Up @@ -176,7 +176,7 @@ for infile in "$target"/Snek/*.in; do
esac
desktop="$target"/Snek/"$desktop"
rm -f "$desktop"
sed -e "s;@SHAREDIR@;$BIN;" -e "s;@BINDIR@;$BIN;" -e "s;@ICONDIR@;$BIN;" "$infile" > "$desktop"
sed -e "s;@"SHAREDIR"@;$BIN;g" -e "s;@"BINDIR"@;$BIN;g" -e "s;@"ICONDIR"@;$BIN;g" -e "s;@"SNEK_VERSION"@;@SNEK_VERSION@;g" "$infile" > "$desktop"
chmod +x "$desktop"
done

Expand Down

0 comments on commit 5fda633

Please sign in to comment.