From: sparky4 <sparky4@cock.li>
Date: Fri, 6 Jan 2017 18:04:19 +0000 (-0600)
Subject: makefile polished!!
X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=230b56dabb4ef687f1fd21babdfdef58e2484abb;p=16.git

makefile polished!!
---

diff --git a/betaget.bat b/betaget.bat
new file mode 100755
index 00000000..d7e2add0
--- /dev/null
+++ b/betaget.bat
@@ -0,0 +1,60 @@
+@echo off
+iff exist %* then
+	del %*
+endiff
+setlocal
+set url="http://beta.latech.edu/~wwc001/16"
+rem for %@eval[%#+1] in (%*) do (
+rem for %# in (1,1,%*) do (
+:loop
+	set /a o=0
+:oooo
+	set /a q=%@EVAL[%@LEN[%1] - 4]
+	set w=%@INSTR[0,%q,%1]
+	iff NOT "%w" == "" then
+	set /a o=%o+1
+	set y=%w.z%o
+rem	 echo y=%y
+	if %o lt 100 (
+		if %o lt 10 (
+			set z=00%o
+		) else (
+			set z=0%o
+		) endif
+	) else if %o gt 99 (
+		set z=%o
+	) endif
+
+	htget http://%url/%1.zip.%z > %y
+rem  	pause
+	iff NOT "%@FILESIZE[%y,b]" == "0" then
+		type %y >> %w.zip
+		iff "%@FILESIZE[%y,b]" == "65536" then
+rem  				echo o=%o
+			goto oooo
+		endiff
+		iff NOT "%#" == "0" then
+			shift /1
+			iff exist %w.zip then
+				unzip %w.zip
+				del %w.z*
+			endiff
+			goto loop
+		else
+			del %#
+		endiff
+	else
+		del %y
+		echo Error null zip file wwww
+	endiff
+	else
+		rem del %y.z*
+		rem need to add a cleaner wwww
+		echo done~ wwww
+	endiff
+rem  echo y="%y"
+rem  echo q=%q
+rem  echo o=%o
+rem  echo w=%w
+rem  echo %%1=%1
+endlocal
diff --git a/makefile b/makefile
index 116be140..21bdfacc 100755
--- a/makefile
+++ b/makefile
@@ -82,8 +82,9 @@ DOSLIB_JOYSTICK=$(DOSLIBDIR)/hw/joystick
 DOSLIB_MEMMODE=dos86$(MEMORYMODE)
 
 # remote host (for sparky4)
-HOSTUSER=sparky4
-HOSTADDR=138.47.241.110
+HOSTUSER=wwc001
+HOSTADDR=beta.latech.edu
+HOSTDIR=~/public_html/
 #ssh port
 HOSTPORT=22
 
@@ -393,10 +394,10 @@ www: .symbolic
 	@wmake -h wwwext
 
 wwwext: .symbolic
-	@ssh -p $(HOSTPORT) $(HOSTUSER)@$(HOSTADDR) 'rm -f /var/www/16/*exe*'
-	@scp -r -P $(HOSTPORT) *.exe $(HOSTADDR):/var/www/16/
-	@scp -r -P $(HOSTPORT) x4get.bat $(HOSTADDR):/var/www/16/
-	@scp -r -P $(HOSTPORT) /var/www/*.exe.zip.* $(HOSTADDR):/var/www/16/
+	####----@ssh -p $(HOSTPORT) $(HOSTUSER)@$(HOSTADDR) 'rm -f $(HOSTDIR)/16/*exe*'
+	@scp -r -P $(HOSTPORT) *.exe $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
+	@scp -r -P $(HOSTPORT) *get.bat $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
+	@scp -r -P $(HOSTPORT) /var/www/*.exe.zip.* $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
 
 getwww: .symbolic
 	*x4get.bat $(EXEC)