]> 4ch.mooo.com Git - 16.git/commitdiff
makefile polished!!
authorsparky4 <sparky4@cock.li>
Fri, 6 Jan 2017 18:04:19 +0000 (12:04 -0600)
committersparky4 <sparky4@cock.li>
Fri, 6 Jan 2017 18:04:19 +0000 (12:04 -0600)
betaget.bat [new file with mode: 0755]
makefile

diff --git a/betaget.bat b/betaget.bat
new file mode 100755 (executable)
index 0000000..d7e2add
--- /dev/null
@@ -0,0 +1,60 @@
+@echo off\r
+iff exist %* then\r
+       del %*\r
+endiff\r
+setlocal\r
+set url="http://beta.latech.edu/~wwc001/16"\r
+rem for %@eval[%#+1] in (%*) do (\r
+rem for %# in (1,1,%*) do (\r
+:loop\r
+       set /a o=0\r
+:oooo\r
+       set /a q=%@EVAL[%@LEN[%1] - 4]\r
+       set w=%@INSTR[0,%q,%1]\r
+       iff NOT "%w" == "" then\r
+       set /a o=%o+1\r
+       set y=%w.z%o\r
+rem     echo y=%y\r
+       if %o lt 100 (\r
+               if %o lt 10 (\r
+                       set z=00%o\r
+               ) else (\r
+                       set z=0%o\r
+               ) endif\r
+       ) else if %o gt 99 (\r
+               set z=%o\r
+       ) endif\r
+\r
+       htget http://%url/%1.zip.%z > %y\r
+rem    pause\r
+       iff NOT "%@FILESIZE[%y,b]" == "0" then\r
+               type %y >> %w.zip\r
+               iff "%@FILESIZE[%y,b]" == "65536" then\r
+rem                            echo o=%o\r
+                       goto oooo\r
+               endiff\r
+               iff NOT "%#" == "0" then\r
+                       shift /1\r
+                       iff exist %w.zip then\r
+                               unzip %w.zip\r
+                               del %w.z*\r
+                       endiff\r
+                       goto loop\r
+               else\r
+                       del %#\r
+               endiff\r
+       else\r
+               del %y\r
+               echo Error null zip file wwww\r
+       endiff\r
+       else\r
+               rem del %y.z*\r
+               rem need to add a cleaner wwww\r
+               echo done~ wwww\r
+       endiff\r
+rem  echo y="%y"\r
+rem  echo q=%q\r
+rem  echo o=%o\r
+rem  echo w=%w\r
+rem  echo %%1=%1\r
+endlocal\r
index 116be1409c6d04cf919630cb04dbbaf58c00f48c..21bdfacc14a020ab71be2fb9b1c55858a9781a15 100755 (executable)
--- 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)