[ Index ]

PHP Cross Reference of GASELL SVN Trunk

title

Body

[close]

/tools/ -> indent.sh (source)

   1  #!/bin/bash
   2  #
   3  # Gasell: Copyright 2004-2005 Linux-Nantes Association <contact@gasell.org>
   4  #
   5  # You should have received a copy of the GNU Public
   6  # License along with this package; if not, write to the
   7  # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   8  # Boston, MA 02111-1307, USA.
   9  #
  10  # Authors: Raude-Morvan Damien (DrazziB) <drazzib@drazzib.com>
  11  
  12  
  13  #Répertoire de GASELL
  14  GSL_DIR="../";
  15  
  16  # Options de Indent
  17  INDENTOPTS="--ignore-profile \
  18  --line-length80 \
  19  --indent-level4 \
  20  --use-tabs \
  21  --declaration-indentation0 \
  22  --dont-break-function-decl-args \
  23  --dont-break-procedure-type \
  24  --no-space-after-function-call-names \
  25  --braces-after-struct-decl-line \
  26  --braces-after-if-line \
  27  --brace-indent1 \
  28  --break-after-boolean-operator \
  29  --ignore-newlines";
  30  
  31  # Aide :)
  32  #--ignore-profile            Ignore le fichier de config personnel
  33  #--preserve-mtime            Préservation de la date de modification
  34  #--line-length78            Longueur de ligne 78 carac.
  35  #--indent-level4            Indentation de 4 espaces
  36  #--declaration-indentation2        Alignement des déclarations
  37  #--no-tabs                Utilisation de espaces
  38  #--use-tabs                Utilisation des tabulations
  39  #--dont-break-function-decl-args    Pas de \n pour les arguments, lors d'une decl de function
  40  #--dont-break-procedure-type        Pas de \n pour le retour d'une procedure
  41  #--no-space-after-function-call-names    Pas d'espaces lors de l'appel d'une function
  42  #--braces-after-struct-decl-line    Accolades après la def. de la struct.
  43  #--braces-after-if-line            Accolades après la ligne du if
  44  #--brace-indent1"            Indentation de accolades de 1 par rapport à la ligne précédente
  45  
  46  # Récupération de la liste des fichiers
  47  GSL_FILES=`/usr/bin/find $GSL_DIR -maxdepth 2 -type f -name *.php ! -name *fpdf* ! -name *fonts*`;
  48  
  49  for thisfile in $GSL_FILES
  50  do
  51      echo  "Traitement du fichier $thisfile";
  52      indent $INDENTOPTS $thisfile;
  53      sed -i "s/< ? php/<?php/" $thisfile;
  54      sed -i "s/? >/?>/" $thisfile;
  55      rm -f "$thisfile~";
  56  done


Generated: Tue Jan 6 01:17:25 2009 Cross-referenced by PHPXref 0.7