Thread overview
Very tiny script for testing D projects with Pijul version control system.
Oct 14
Oct 14
Jan 26
Feb 02
October 14
GIT IMHO very heavy for tiny projects. And I decided to try
I am developing on Windows, but I need to test code on Linux. So I did very simple tool-chain:
Developing on Windows.
Making package with command: `pijul dist -d latest`
Syncing code to Linux VPS/VirtualBox instance with WinSCP.
Running next script that replace content of folder with latest version from archive.
Unpacking with: `unpack latest.tar.gz`

Place next script to: /usr/local/bin/unpack

if [ ${1: -7} == ".tar.gz" ]
     tar --strip-components=1 -xf latest.tar.gz
     echo "You should specify archive name"
     echo $1

latest.tar.gz should be placed in app dir folder on the same level with `sourse` folder.

Hope this will helpful!
October 14
Here is Windows .bat file that complete uploading project to server with SSH:

@echo off
for %%a in ("%cd%") do set folder=%%~na /command "open sftp://root:PassW0rd@" "put latest.tar.gz /code/%folder%/" "exit"

Local folder name should be same with remote name. It's auto-detect in second line.

So you can copy-paste this script to any project without modification.

D:\code\app1 will try to upload `latest.tar.gz` to /code/app1
D:\code\myapp will try to upload `latest.tar.gz` to /code/myapp

And so on.

January 26
Could anybody help me? I decided to use key-auth instead pass-auth. But when I run next command I am getting error: /command "open devuser@" /privatekey=C:\Users\dev\.ssh\my_private_key.ppk "put latest.tar.gz /home/devuser/folder" "exit"

about wrong syntax.
February 02
Good news!
Working version:

@echo off
for %%a in ("%cd%") do set folder=%%~na /command  "open devuser@ -privatekey=C:\Users\suliman\.ssh\123.ppk" "put latest.tar.gz /home/devuser/folder/" "exit"

1. File-name hard-coded
2. WinSCP should be installed and added to PATH