changeset 22:34d29998b82f

Handle same remote and local username correctly.
author Omair Majid <omajid@redhat.com>
date Fri, 10 Oct 2014 12:59:32 -0400
parents 06f1ae8aab44
children 1b95bd122ba8
files Makefile
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Oct 09 18:16:02 2014 -0400
+++ b/Makefile	Fri Oct 10 12:59:32 2014 -0400
@@ -16,11 +16,12 @@
 REMOTE_PATH = /var/lib/thermostat-web
 REMOTE_ARGS = --exclude-from=$(EXCLUDE_FILE) -arvz ./
 
+ifndef REMOTE_USER
+  REMOTE_USER=$(USER)
+endif
+
 all:	deploy
 
 deploy:
-	if [ $(REMOTE_USER)x = x ] ; then \
-	  REMOTE_USER=${USER} ; \
-	fi
 	$(RSYNC) $(REMOTE_ARGS) $(REMOTE_USER)@$(REMOTE_SERVER):$(REMOTE_PATH)