OSSP CVS Repository

ossp - Difference in ossp-pkg/due/.due/due.fs.sh versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/due/.due/due.fs.sh 1.2 -> 1.3

--- due.fs.sh    2004/10/24 19:10:38     1.2
+++ due.fs.sh    2007/05/24 17:18:30     1.3
@@ -45,3 +45,14 @@
 #   canonicalization of df(1) output
 alias df='command df -k'
 
+#   convert between Unix/LF and Windows/CRLF
+if type -P recode 2>/dev/null; then
+    #   full charset conversion
+    alias unix2win="recode ISO-8859-1..CP1252/CR-LF"
+    alias win2unix="recode CP1252/CR-LF..ISO-8859-1"
+elif type -P perl 2>/dev/null; then
+    #   sufficient for at least CR/LF conversion
+    alias unix2win="perl -p -i.orig -e 's/\r?\n/\r\n/sg;'"
+    alias win2unix="perl -p -i.orig -e 's/\r\n/\n/sg;'"
+fi
+

CVSTrac 2.0.1