Moving to GitHub.
[platal.git] / bin / check_security_fixes.py
index 4d87c93..019e9fa 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #***************************************************************************
-#*  Copyright (C) 2003-2009 Polytechnique.org                              *
+#*  Copyright (C) 2003-2014 Polytechnique.org                              *
 #*  http://opensource.polytechnique.org/                                   *
 #*                                                                         *
 #*  This program is free software; you can redistribute it and/or modify   *
@@ -25,10 +25,10 @@ patches.
 
 Important notice: do not execute this script directly from an automatic checkout
 of plat/al. It would be extremely unwise to execute it with root privileges from
-a place where everybody can change it !
+a place where everybody can change it!
 
 Usage (-w updates the local .htaccess to disable guilty working copies):
-  check_security_fixes.py [-w] -b REFERENCE_PLATAL PLATAL_TO_CHECK ...
+  check_security_fixes.py [-w] -b REFERENCE_PLATAL PLATAL_TO_CHECK...
 """
 
 import optparse
@@ -80,7 +80,7 @@ class WorkingCopy(object):
     ref_file = os.path.join(self.reference_path, security_file)
     wc_file = os.path.join(self.checkout_path, security_file)
 
-    diff = os.popen('diff -NBwu0 %s %s' % (ref_file, wc_file))
+    diff = os.popen('diff -NBw -U 0 %s %s' % (ref_file, wc_file))
     for line in diff.readlines():
       if self.SECURITY_FIX_RE.match(line):
         yield line[1:-1]
@@ -143,7 +143,7 @@ def SelfCheckIsLatestVersion(base_path):
   most deployment will want to execute this script with root privileges,
   which implies that this script is deployed in a safe directory, and not
   just executed from an automatically updated checkout of plat/al (how
-  unsafe would that be ...)."""
+  unsafe would that be...)."""
 
   base_script = os.path.join(base_path, 'bin/check_security_fixes.py')
   local_script = os.path.abspath(sys.argv[0])
@@ -174,4 +174,4 @@ def main():
 if __name__ == '__main__':
   main()
 
-# vim:set et sw=2 sts=2 sws=2 enc=utf-8:
+# vim:set et sw=2 sts=2 sws=2 fenc=utf-8: