City of Arabel
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Definitive Get/Put Arabel Scripts

    Scheduled Pinned Locked Moved Server Management
    1 Posts 1 Posters 94 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DoctorDethD
      DoctorDeth
      last edited by DoctorDeth

      Assuming you've gone through the Putty SSH key setup, these are the last scripts you'll ever need.

      This also assumes you've correctly installed the 64-bit versions of 7-zip and PuTTY. And not just putty.exe, but the full archive at the top of the page (the MSI installer).

      These scripts go in your Documents\Neverwinter Nights\modules folder.

      Arabel Production

      GetArabel.bat

      @echo off
      REM Progra~1 is a shortcut for "Program Files" so we don't have to mess with quotes.
      set PATH=C:\Progra~1\7-Zip;%PATH%
      set PATH=C:\Progra~1\PuTTY;%PATH%
      
      IF NOT EXIST Arabel.mod GOTO :PostMove
      IF EXIST Arabel.bak del Arabel.bak
      move /-Y "Arabel.mod" "Arabel.bak" 
      
      :PostMove
      pscp -sftp -C -4 -P 8222 modprod@arabel.cityofarabel.com:/home/modprod/nwn/modules/Arabel.mod Arabel.mod
      
      :Exit
      
      pause
      

      PutArabel.bat

      @echo off
      REM Progra~1 is a shortcut for "Program Files" so we don't have to mess with quotes.
      set PATH=C:\Progra~1\7-Zip;%PATH%
      set PATH=C:\Progra~1\PuTTY;%PATH%
      
      ECHO Compressing Arabel.mod
      IF EXIST Arabel.7z DEL Arabel.7z
      7z a -t7z Arabel.7z Arabel.mod
      
      ECHO Transferring mod to server
      pscp -sftp -P 8222 Arabel.7z modprod@arabel.cityofarabel.com:/home/modprod/nwn/modules/Arabel.7z
      IF errorlevel 1 GOTO :Error
      
      :Extract
      plink -batch -x -a -2 -ssh -P 8222 modprod@arabel.cityofarabel.com /home/modprod/nwn/modules/autoextract.sh
      GOTO :Exit
      
      :Error
      echo There was an error transferring the file
      pause
      GOTO :Exit
      
      :Exit
      ECHO Exit, all done we think
      pause
      

      Arabel Development

      GetAraDev.bat

      @echo off
      REM Progra~1 is a shortcut for "Program Files" so we don't have to mess with quotes.
      set PATH=C:\Progra~1\7-Zip;%PATH%
      set PATH=C:\Progra~1\PuTTY;%PATH%
      
      IF NOT EXIST AraDev.mod GOTO :PostMove
      IF EXIST AraDev.bak del AraDev.bak
      move /-Y "AraDev.mod" "AraDev.bak" 
      
      :PostMove
      pscp -sftp -C -4 -P 8222 moddev@arabel.cityofarabel.com:/home/moddev/nwn/modules/AraDev.mod AraDev.mod
      
      REM IF NOT errorlevel 1 GOTO :Unzip
      REM del AraDev.mod
      REM echo There was an error transferring the file, the partially downloaded file has been deleted.
      REM pause
      REM GOTO :Exit
      
      REM :Unzip
      REM echo Extracting AraDev.7z
      REM 7z e -y AraDev.7z
      REM echo All done.
      REM GOTO :Exit
      
      :Exit
      
      pause
      

      PutAraDev.bat

      @echo off
      REM Progra~1 is a shortcut for "Program Files" so we don't have to mess with quotes.
      set PATH=C:\Progra~1\7-Zip;%PATH%
      set PATH=C:\Progra~1\PuTTY;%PATH%
      
      ECHO Compressing AraDev.mod
      IF EXIST AraDev.7z DEL AraDev.7z
      7z a -t7z AraDev.7z AraDev.mod
      
      ECHO Transferring mod to server
      pscp -sftp -P 8222 AraDev.7z moddev@arabel.cityofarabel.com:/home/moddev/nwn/modules/AraDev.7z
      IF errorlevel 1 GOTO :Error
      
      :Extract
      plink -batch -x -a -2 -ssh -P 8222 moddev@arabel.cityofarabel.com /home/moddev/nwn/modules/autoextract.sh
      GOTO :Exit
      
      :Error
      echo There was an error transferring the file
      pause
      GOTO :Exit
      
      :Exit
      ECHO Exit, all done we think
      pause
      

      In theory, practice and theory are the same. In practice, however, they are not.

      1 Reply Last reply Reply Quote
      • folkloreF folklore moved this topic from Instructions
      • 1 / 1
      • First post
        Last post