[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
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 1 12 fi 13 set -e 14 SE3MODULE="se3-ocs" 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 svn update $PATH_SE3MODULE || exit 1 66 67 cp -a "$PATH_SE3MODULE" /tmp/ 68 cd /tmp/ 69 70 echo "Suppression reps .svn" 71 72 find ./$SE3MODULE -name .svn -print0 | xargs -0 rm -r 73 74 # echo "traitement utf8 pour etch" 75 # if [ "$DISTRIB" == "etch" ]; then 76 # A=`find ./$SE3MODULE -iname "*.sh" -type f` 77 # for FICH in $A 78 # do 79 # recode latin9..utf8 $FICH 80 # echo "$FICH-->ok" 81 # done 82 # fi 83 84 echo "construction du paquet $SE3MODULE" 85 POURSUIVRE 86 cd $SE3MODULE/$SOURCE_DIR 87 chmod +x ./scripts/* 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 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" -o "$DISTRIB" == "all" ]; then 102 scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/etch/se3$OPT/binary-i386/net/ 103 [ "$BRANCHE" == "all" ] && scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/etch/se3/binary-i386/net/ 104 105 fi 106 107 if [ "$DISTRIB" == "lenny" -o "$DISTRIB" == "all" ]; then 108 scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/lenny/se3$OPT/binary-i386/net/ 109 [ "$BRANCHE" == "all" ] && scp -P 2222 $SE3MODULE*.deb root@wawadeb:/var/ftp/debian/dists/stable/se3/binary-i386/net/ 110 fi 111 exit 0
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |