changeset 5:aea50b6c72d6

Add Makefile with target to make easy deployment over rsync.
author Jon VanAlten <jon.vanalten@redhat.com>
date Thu, 28 Feb 2013 14:52:23 -0500
parents d48b0f8e7e27
children bb00491f9f6a
files Makefile rsync-exclude
diffstat 2 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Thu Feb 28 14:52:23 2013 -0500
@@ -0,0 +1,26 @@
+#
+# This is just a deployment helper.  To use, type "make deploy" or even just "make"
+# You will get a permission error if you are not a member of the "icedtea" group
+# on the server, or possibly if your account's shell does not permit the use of
+# rsync,  It is assumed that your current user has pubkey set up for accessing the
+# server.
+#
+# If your local user is not the same as the remote user, "REMOTE_USER=myuser make"
+# will help you out.
+#
+
+# Files matching this pattern will *not* be synced in either direction.
+EXCLUDE_FILE = rsync-exclude
+RSYNC = rsync
+REMOTE_SERVER = icedtea.classpath.org
+REMOTE_PATH = /var/lib/thermostat-web
+REMOTE_ARGS = --exclude-from=$(EXCLUDE_FILE) -arvz ./
+
+all:	deploy
+
+deploy:
+	if [ $(REMOTE_USER)x = x ] ; then \
+	  REMOTE_USER=${USER} ; \
+	fi
+	$(RSYNC) $(REMOTE_ARGS) $(REMOTE_USER)@$(REMOTE_SERVER):$(REMOTE_PATH)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rsync-exclude	Thu Feb 28 14:52:23 2013 -0500
@@ -0,0 +1,5 @@
+# See man rsync for details on specifying patterns to exclude.
+/Makefile
+/rsync-exclude
+/javadoc/
+/.hg/