[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  #!/bin/bash
   2  # $Id$
   3  DISTRIB=$1
   4  BRANCHE=$2
   5  [ "$BRANCHE" != "stable" ] && OPT="XP"
   6  
   7  if [ "$BRANCHE" == "" -o "$DISTRIB" == "" ]; then
   8  echo "usage :  $0 distrib branche
   9  distrib : lenny ou etch
  10  branche : stable ou xp"
  11  exit 0
  12  fi
  13  
  14  SE3MODULE="se3-dhcp"
  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  chmod +x ./scripts/*
  89  dh_clean
  90  debuild -uc -us -b
  91  cd ..
  92  cp *.deb "$PATH_SE3MODULE"/
  93  cd /tmp
  94  rm -rf $SE3MODULE
  95  cd $PATH_SE3MODULE
  96  
  97  echo "copie sur le dépot se3$OPT du paquet $SE3MODULE pour la branche $BRANCHE"
  98  POURSUIVRE
  99  # scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/stable/se3XP/binary-i386/net/
 100  
 101  
 102  if [ "$DISTRIB" == "etch" -o "$DISTRIB" == "all" ]; then
 103      scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/etch/se3$OPT/binary-i386/net/
 104      [ "$BRANCHE" == "all" ] && scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/etch/se3/binary-i386/net/
 105      
 106  fi
 107  
 108  if [ "$DISTRIB" == "lenny" -o "$DISTRIB" == "all" ]; then
 109       scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/lenny/se3$OPT/binary-i386/net/
 110       [ "$BRANCHE" == "all" ] && scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/stable/se3/binary-i386/net/
 111  fi
 112  exit 0


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