Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: (OT) Fixing Line Endings

by cLive ;-) (Parson)
on Nov 30, 2006 at 16:49 UTC ( #587004=note: print w/ replies, xml ) Need Help??


in reply to Re^3: (OT) Fixing Line Endings
in thread (OT) Fixing Line Endings

Then don't alter the files, just add a check like this as an upload hook:

$file_content =~ m|^#!(/usr/[\w\/]*)\s*\r\n|s and -e $1 and `ln -s $1 $1\\r`;

(untested). Then only the link gets created on upload, and the original file is untouched.

We use pure FTP now after having big problems with ProFTPd (I forget what they were now). It's login/upload hooks are easy to use, and the overhead is pretty trivial.


Comment on Re^4: (OT) Fixing Line Endings
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://587004]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2014-08-20 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (107 votes), past polls