[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/ -> BuildSe3.sh (source)

   1  #!/bin/bash
   2  
   3  # Patchage des numeros de versions
   4  
   5  VERSION=$1
   6  DISTRIB=$2
   7  BRANCHE=$3
   8  
   9  if ([ -z "$VERSION" ] || [ -z "$DISTRIB" ] || [ -z "$BRANCHE" ]); then
  10  echo "$0 version, distrib, branche (stable ou xp)"
  11  echo "ex : $0 1.20 lenny xp"
  12  exit 1
  13  fi
  14  
  15  
  16  [ "$BRANCHE" == "" -o "$BRANCHE" != "stable" ] && OPT="XP"
  17  
  18  if [ -z "$DISTRIB" ]; then
  19      DISTRIB="etch"
  20      echo "etch choisi par défaut, OK ?"
  21      read dummy
  22  
  23  fi
  24  
  25  if [ -d build ]; then
  26      rm -r build
  27  fi
  28  mkdir build
  29  cp -r se3master/* build
  30  cd build
  31  ../svnrmadm
  32  MAJNB=48
  33  while true; do
  34      if [ ! -e var/cache/se3_install/maj/maj$MAJNB.sh ]; then
  35          break
  36      fi
  37      let MAJNB+=1
  38  done
  39  
  40  mv DEBIAN/control.$DISTRIB ctrl
  41  rm DEBIAN/control.*
  42  # mv DEBIAN/postinst.$DISTRIB DEBIAN/pst
  43  # rm DEBIAN/postinst.*
  44  # mv DEBIAN/pst DEBIAN/postinst
  45  
  46  cat ctrl | sed -e "s/#VERSION#/$VERSION/g"> DEBIAN/control
  47  mv var/cache/se3_install/se3db.sql se3db.sql
  48  cat se3db.sql | sed -e "s/#VERSION#/$VERSION/g" | sed -e "s/#MAJNBR#/$MAJNB/g" > var/cache/se3_install/se3db.sql
  49  rm  ctrl se3db.sql 
  50  
  51  echo "Version $VERSION du "`date` > var/cache/se3_install/version
  52  
  53  # Remise en place des droits sur les fichiers
  54  
  55  chmod -R 755 DEBIAN
  56  chmod -R 750 var/cache/se3_install
  57  chmod 644 var/cache/se3_install/conf/*
  58  chmod 644 var/cache/se3_install/reg/*
  59  chmod 755 var/cache/se3_install/conf/apachese
  60  chmod 600 var/cache/se3_install/conf/config.inc.php.in
  61  chmod 600 var/cache/se3_install/conf/SeConfig.ph.in
  62  chmod 600 var/cache/se3_install/conf/slapd_*.in
  63  chmod 640 var/cache/se3_install/conf/mrtg.cfg
  64  chmod 440 var/cache/se3_install/conf/sudoers
  65  
  66  # Changement des fins de lignes dos
  67  
  68  dos2unix var/cache/se3_install/scripts/*.sh
  69  dos2unix var/cache/se3_install/scripts/*.pl
  70  dos2unix var/cache/se3_install/sudoscripts/*.sh
  71  dos2unix var/cache/se3_install/sudoscripts/*.pl
  72  
  73  # tratement utf8 pour etch 
  74  #if [ "$DISTRIB" == "etch" ]; then
  75  #    rm var/cache/se3_install/install_se3_lenny.sh
  76  
  77  #else
  78  #    rm var/cache/se3_install/install_se3_etch.sh
  79  
  80  #fi
  81  
  82  echo "Modif vers utf8 pour etch / Lenny"
  83  recode latin9..utf8 var/cache/se3_install/scripts/*.sh
  84  recode latin9..utf8 var/cache/se3_install/sudoscripts/*.sh
  85  recode latin9..utf8 var/cache/se3_install/*.sh
  86  
  87  
  88  
  89  # tratement utf8 pour etch 
  90  cd var/cache/se3_install/wwwse3
  91  # if [ "$DISTRIB" == "etch" ]; then
  92  # A=`find ./ -iname "*.inc" -o -iname "*.php" -o -iname "*.html" -type f`
  93  #             for FICH in $A
  94  #         do
  95  #             recode latin9..utf8 $FICH
  96  #             echo "$FICH-->ok"
  97  #         done
  98  # fi
  99  
 100  # Refabrication de l'archive wwwse3.tgz
 101  tar -czf ../wwwse3.tgz se3
 102  cd ..
 103  rm -r wwwse3
 104  cd ../../../..
 105  
 106  
 107  
 108  # Fabrication du paquet se3
 109  dpkg-deb -b build se3_$VERSION$DISTRIB\_i386.deb
 110  
 111  if [ "$DISTRIB" == "etch" ]; then
 112      scp -P 2222 se3_${VERSION}etch_i386.deb root@wawadeb:/var/ftp/debian/dists/etch/se3$OPT/binary-i386/net/
 113  else
 114       scp -P 2222 se3_${VERSION}lenny_i386.deb root@wawadeb:/var/ftp/debian/dists/stable/se3$OPT/binary-i386/net/
 115  fi


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