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