0

I have a bash script for deploying my app jars and sh files from the dev machine to prod machine (centos). it simply calls scp and copies all the necessary files. when I run it from an ubuntu box, everything's good. when I run it from a windows 7 with cygwin 6.1 installed, I get the following corruptions on the prod machine:

  • bash scripts do not work as they have CR instead of CR/LF
  • the jar files do not work as they are corrupted zips

These 2 phenoms do NOT happen when I use winscp. what am i missing? I want to continue using my beloved bash deploy scripts for all machines, and don't want to resort for winscp deployment on windows boxes...

ihadanny
  • 167
  • 6
  • 1
    What is "cygwin 6.1" ? Cygwin, being a rolling distribution, has no specific version number, per se, and the latest version of the Cygwin DLL is 1.7.13. – Steven Monday Apr 22 '12 at 15:12

1 Answers1

2

I don't think Cygwin scp is corrupting the files. I think you need to run dos2unix on your text files before or after copying them to the Linux system. I'm not sure, but you probably need to do same for files going into your jar files before zip'ing them.

ZaSter
  • 329
  • 4
  • 11
  • thanks, used `perl -pi -e 's/\r\n/\n/g'` to fix the bash scripts, and the jar was actually a separate problem related to cygwin permissions – ihadanny May 29 '12 at 12:05