From 35336574c8d888897bf34b0fecd9649e2e0db6fa Mon Sep 17 00:00:00 2001 From: Bruce Allen Date: Wed, 5 Jan 2005 13:20:37 +0000 Subject: [PATCH] build self-extracting archive, by Bernd Machenschalk svn path=/trunk/boinc/; revision=4995 --- Makefile.am | 2 +- checkin_notes | 15 +++++++++++++++ sea/BOINC/binstall.sh | 4 ++++ sea/Makefile | 16 ++++++++++++++++ sea/make-sea.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 sea/BOINC/binstall.sh create mode 100644 sea/Makefile create mode 100755 sea/make-sea.sh diff --git a/Makefile.am b/Makefile.am index c2870690eb..eb9c5d56cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,7 @@ if ENABLE_CLIENT endif if BUILD_CLIENTGUI - CLIENTGUI_SUBDIRS = clientgui + CLIENTGUI_SUBDIRS = clientgui sea endif # ORDER MATTERS below. One must build dependencies FIRST, then things diff --git a/checkin_notes b/checkin_notes index 87103a0f56..472a474a4d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -22075,3 +22075,18 @@ David 3 Jan 2005 reduce.C (removed) reduce_lib.C (new) reduce_main.C (new) + +Bruce 5 Jan 2005 + - added new directory which builds a self-extracting tar + archive (executable shell script) for installation on + unix platforms. This will only be made when building + the client GUI and installs both the boinc client and + client GUI. Written and tested by Bernd Machenschalk. + + Makefile.am + sea/ [New Directory] + make-sea.sh + Makefile + BOINC/ + binstall.sh + diff --git a/sea/BOINC/binstall.sh b/sea/BOINC/binstall.sh new file mode 100644 index 0000000000..a44c7590aa --- /dev/null +++ b/sea/BOINC/binstall.sh @@ -0,0 +1,4 @@ +cd BOINC && +echo "cd \"`pwd`\" && ./boinc_client" > run_client && +chmod +x run_client +echo now run `pwd`/run_client to run the client and `pwd`/boinc_gui to run the GUI diff --git a/sea/Makefile b/sea/Makefile new file mode 100644 index 0000000000..27a6f4d576 --- /dev/null +++ b/sea/Makefile @@ -0,0 +1,16 @@ +all: boinc_sea.sh + +boinc_sea.sh: make-sea.sh sea.tar + ./make-sea.sh sea.tar boinc_sea.sh BOINC/binstall.sh + +sea.tar: BOINC/boinc_client BOINC/boinc_gui BOINC/binstall.sh + tar chf $@ $^ + +BOINC/boinc_client: ../client/boinc_client + ln -s ../$< $@ + +BOINC/boinc_gui: ../clientgui/boinc_gui + ln -s ../$< $@ + +clean: + rm -f BOINC/boinc_* sea.tar boinc_sea.sh diff --git a/sea/make-sea.sh b/sea/make-sea.sh new file mode 100755 index 0000000000..320a20c717 --- /dev/null +++ b/sea/make-sea.sh @@ -0,0 +1,41 @@ +#!/bin/sh +if [ $# -lt 1 ] || [ $# -gt 3 ]; then + echo 'usage: make-sea.sh [.sh] [.sh]' + exit +fi + +# parse optional arguments +if [ -z "$2" ]; then + filename="`uname`_sea.sh" +else + filename="$2" +fi +if [ -z "$3" ]; then + install=install.sh +else + install="$3" +fi + +# peek into archive for the install skript +if tar tf "$1" | grep "$install" >/dev/null; then + : +else + echo "the archive \"$1\" doesn't contain the specified install skript \"$install\"" + exit +fi + +# find out about compression to use +# Linux usually doesn't even have compress, otherwise its standard +if [ `uname` = "Linux" ]; then + compress=gzip + expand=gunzip +else + compress=compress + expand=uncompress +fi + +echo '#!/bin/sh +tail +4 < "$0" | '$expand' | tar xf - && /bin/sh '"$install $*"' +exit' > "$filename" && +$compress < "$1" >> "$filename" && +chmod +x "$filename"