[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-wpkg/ -> build_se3-wpkg.sh (source)

   1  #!/bin/bash
   2  # $Id$
   3  DISTRIB=$1
   4  BRANCHE=$2
   5  
   6  [ "$BRANCHE" != "stable" ] && OPT="XP"
   7  if [ "$BRANCHE" == "" -o "$DISTRIB" == "" ]; then
   8  echo "usage :  $0 distrib branche
   9  distrib : sarge ou etch
  10  branche : stable ou xp"
  11  exit 1
  12  fi
  13  
  14  SE3MODULE="se3-wpkg"
  15  PATH_SVN_LOCAL="/digloo/deb/se3/"
  16  PATH_SE3MODULE="$(pwd)"
  17  
  18  
  19  SOURCE_DIR="sources"
  20  #Couleurs
  21  COLTITRE="\033[1;35m"    # Rose
  22  COLPARTIE="\033[1;34m"    # Bleu
  23  
  24  COLTXT="\033[0;37m"    # Gris
  25  COLCHOIX="\033[1;33m"    # Jaune
  26  COLDEFAUT="\033[0;33m"    # Brun-jaune
  27  COLSAISIE="\033[1;32m"    # Vert
  28  
  29  COLCMD="\033[1;37m"    # Blanc
  30  
  31  COLERREUR="\033[1;31m"    # Rouge
  32  COLINFO="\033[0;36m"    # Cyan
  33  
  34  
  35  ERREUR()
  36  {
  37  echo -e "$COLERREUR"
  38  echo "ERREUR!"
  39  echo -e "$1"
  40  echo -e "$COLTXT"
  41  exit 1
  42  }
  43  
  44  
  45  
  46  POURSUIVRE()
  47  {
  48      REPONSE=""
  49      while [ "$REPONSE" != "o" -a "$REPONSE" != "O" -a "$REPONSE" != "n" ]
  50      do
  51          #echo -e "$COLTXT"
  52          echo -e "$COLTXT}Peut-on poursuivre ? ($COLCHOIX}O/n$COLTXT}) $COLSAISIE\c"
  53          read REPONSE
  54          if [ -z "$REPONSE" ]; then
  55              REPONSE="o"
  56          fi
  57      done
  58  echo -e "$COLTXT"
  59      if [ "$REPONSE" != "o" -a "$REPONSE" != "O" ]; then
  60          ERREUR "Abandon!"
  61      fi
  62  }
  63  
  64  
  65  
  66  svn update $PATH_SE3MODULE || exit 1
  67  
  68  cp -a "$PATH_SE3MODULE" /tmp/
  69  cd /tmp/
  70  
  71  echo "Suppression reps .svn"
  72  
  73  find ./$SE3MODULE -name .svn -print0 | xargs -0 rm -r
  74  
  75  # echo "traitement utf8 pour etch"
  76  # if [ "$DISTRIB" == "etch" ]; then
  77  # A=`find ./$SE3MODULE -iname "*.sh" -type f`
  78  #             for FICH in $A
  79  #         do
  80  #             recode latin9..utf8 $FICH
  81  #             echo "$FICH-->ok"
  82  #         done
  83  # fi
  84  
  85  echo "construction du paquet $SE3MODULE"
  86  POURSUIVRE
  87  cd $SE3MODULE/$SOURCE_DIR
  88  dh_clean
  89  debuild -uc -us -b
  90  cd ..
  91  cp *.deb "$PATH_SE3MODULE"/
  92  cd /tmp
  93  rm -rf $SE3MODULE
  94  cd $PATH_SE3MODULE
  95  
  96  echo "copie sur le dépot $DISTRIB se3$OPT du paquet $SE3MODULE pour la branche $BRANCHE"
  97  POURSUIVRE
  98  # scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/stable/se3XP/binary-i386/net/
  99  
 100  
 101  if [ "$DISTRIB" == "etch" ]; then
 102      scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/etch/se3$OPT/binary-i386/net/
 103  else
 104       scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/stable/se3$OPT/binary-i386/net/
 105  fi


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1