int128 / gradle-ssh-plugin

Gradle SSH Plugin
https://gradle-ssh-plugin.github.io
Apache License 2.0
318 stars 60 forks source link

Feature: Ability to filter text files on transfer to fix line endings #286

Open kushieda-minori opened 7 years ago

kushieda-minori commented 7 years ago

When transfering a perl script from a Windows machine to a Unix machine, the line endings are preserved. I found this http://stackoverflow.com/a/5958926 for fixing the line endings when archiving jars or wars, but I can't seem to apply a similar method to the put or get ssh commands.

From a windows machine with git config autocrlf==auto

// Paste the snippet of script or logs
put from: files("$commandDir/brExecute.pl"), into: 'bin/'

then on the remote machine:

~$ brExecute.pl MyJob MyFile.xlsx
-bash: /home/user/bin/brExecute.pl: /usr/bin/perl^M: bad interpreter: No such file or directory