Raised This Month: $51 Target: $400
 12% 

[batch] sm plugins ftp (sftp) uploader


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-24-2018 , 04:27   [batch] sm plugins ftp (sftp) uploader
Reply With Quote #1

This CMD (batch) file allows you save a time if:
  • you are developing plugins
  • you need upload the same plugin on server again and again (after each local modification)

Purpose:
It automatically compile and upload smx file to FTP (using CURL or Putty) as soon as its timestamp is changed.
When you edit your .sp file press Ctrl + S and it will be compiled (in background) and uploaded in a second.
Alternatively, you can set to track only smx (compiled files).

Versions:
There are 2 version of uploader:
  • 1.2 (for ftp only, using curl.exe)
  • 1.3 (for both sftp and ftp, using pscp.exe (putty command line tool)).

Preparation:
1) (optional) Using Plugin-autoreload is highly recommended. See attached autoreload.zip (it is an optimized fork of original).
Compile it and place in server .../addons/sourcemod/plugins/ folder.

2) Download one of attached sm_upload_*.zip archive. Unpack.

3) Dependency:
- (for v.1.2 only) Download and place CURL.exe in the same folder.
- (for v.1.3 only) Install Putty
- Download local compiler: from here. Unzip it.

4) Edit "sm_upload.cmd" file (open in notepad: right mouse click => Edit).
Set correct path and settings here:
Code:
:: path to spcomp.exe of local compiler
set compiler=d:\dev\SourceMod\addons\sourcemod\scripting\spcomp.exe

:: server settings (in v.1.3)
set server=5.x.x.x
set port=22
set user=l4dserver
set pass=xxx
set servpath=/home/l4dserver/serverfiles/left4dead/

:: or this line (in v.1.2)
set ftp=ftp://user:[email protected]/left4dead/

:: Specify true if you want to upload source files (.sp) as well
set upload_source=false
Save.


How to use:
1) Edit "plugins.txt" file: add full paths to plugins (smx or sp) you want to track.
2) Run "sm_upload.cmd" file and minimize its window to tray every time you need uploader to work.

Alternatively:
You can add files for tracking by context menu (Right Button Mouse Click on any.sp or any.smx file => SendTo => "SM - Track for upload").
To install such menu:
  • create shortcut to "SM - Track for upload.cmd" file.
  • place that shortcut in SendTo folder. To find that folder: press Win + R and enter Shell:SendTo than press OK and paste shortcut there.

You are ready.
Good luck.

Compatibility: Windows Vista+.

Update
Now *.phrases.txt files are also supported.
Attached Files
File Type: zip sm_upload_ftp_1.2.zip (2.1 KB, 141 views)
File Type: zip autoreload.zip (1.5 KB, 151 views)
File Type: zip sm_upload_sftp_1.3.zip (1.9 KB, 162 views)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 01-26-2020 at 11:32. Reason: added sftp ver.1.3
Dragokas is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode