Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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...

share|improve this question
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 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.