Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make a binary tarball with 'make binary'

  • Loading branch information...
commit 2e09be2eaf6dc8a0ca3f6433d5e4a0277c93a168 1 parent 7bd3088
@wesleyd authored
Showing with 40 additions and 5 deletions.
  1. +13 −5 Makefile
  2. +1 −0  VERSION
  3. +26 −0 install.sh
View
18 Makefile
@@ -15,11 +15,7 @@ include $(OBJFILES:.o=.d)
./depend.sh . $< > $@
install: all
- install charade.exe /usr/bin
- if [ -f /usr/bin/ssh-agent.exe -a \! -f /usr/bin/ssh-agent-orig.exe ]; then \
- mv /usr/bin/ssh-agent.exe /usr/bin/ssh-agent-orig.exe; \
- ln -s /usr/bin/charade.exe /usr/bin/ssh-agent.exe; \
- fi
+ ./install.sh
charade.exe: $(OBJFILES)
$(CC) $(CFLAGS) -Wl,--enable-auto-import -o $@ $+
@@ -27,7 +23,19 @@ charade.exe: $(OBJFILES)
copyright.c: LICENCE generate-copyright.pl
./generate-copyright.pl LICENCE > $@
+binary: all VERSION
+ export VNAME=charade-`cat VERSION`; \
+ export DIR=temp/$$VNAME; \
+ mkdir -p $$DIR/ \
+ && cp charade.exe $$DIR \
+ && cp install.sh $$DIR \
+ && cp README.md $$DIR \
+ && (cd temp; tar cf - $$VNAME | bzip2 -9) > $$VNAME.tar.bz2 \
+ && echo created $$VNAME.tar.bz2
+
clean:
rm -f charade.exe
rm -f *.o *.obj
rm -f *.d
+ rm -rf temp
+ rm -f charade-*.tar.bz2 charade-*.tar.gz
View
1  VERSION
@@ -0,0 +1 @@
+0.0.2
View
26 install.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+echo -n "Installing charade into /usr/bin ... "
+install charade.exe /usr/bin
+echo done
+
+echo "Backing up old /usr/bin/ssh-agent.exe ..."
+if [ -e /usr/bin/ssh-agent.exe ]; then
+ if [ -f /usr/bin/ssh-agent-orig.exe ]; then
+ echo -n " Backup already exists: just removing old ssh-agent.exe ..."
+ rm /usr/bin/ssh-agent.exe
+ echo done
+ else
+ echo -n " Moving ssh-agent.exe to ssh-agent-orig.exe ... "
+ mv /usr/bin/ssh-agent.exe /usr/bin/ssh-agent-orig.exe
+ echo done
+ fi
+else
+ echo "No need to backup old ssh-agent - it doesn't exist. Hmmm."
+fi
+
+echo -n "Making ssh-agent point symlinkishly to charade ... "
+ln -s /usr/bin/charade.exe /usr/bin/ssh-agent.exe
+echo done
Please sign in to comment.
Something went wrong with that request. Please try again.