#!/bin/bash #mscoremaj #zenity --info \ #--text="Lancement de mscoremaj." --display=:0 # if this script is launched with a tube to a log file the following line stamp it #echo date +%Y-%m-%d-%H-%M >~/musescore/log # going to compilation directory MUSEPATH=~/musescore/MuseScore/ cd $MUSEPATH REVISION_OLD=`cat ./mscore/revision.h` #echo $REVISION_OLD >>~/musescore/log #updating #ligne bidouillée par mathieu git reset --hard HEAD git pull echo lancement de «make revision >>log make revision echo retour de «make revision >>log REVISION=`cat ./mscore/revision.h` echo dernière=$REVISION_OLD nouvelle=$REVISION > ~/musescore/log if [ "$REVISION_OLD" == "$REVISION" -a "$#" -eq "0" ]; then # if one wants to be advised of any activation of the script, uncomment the two following lines zenity --info \ --text='Pas de nouvelle version de MuseScore. '$REVISION_OLD' = '$REVISION --display=:0 exit else zenity --info \ --text='Nouvelle version de MuseScore !'$REVISION_OLD' => '$REVISION --display=:0 fi #following line to force 32 bits compilation on a 64 bits computer. To be uncommented if the computer is 32 bits #export CFLAGS="-m32" #CC='gcc -m32' #essai 20/9/13 echo commande "make" >> ~/musescore/log make >>~/musescore/log #importing the session password from auxiliary file MOTDEPASSE=`cat ../motdepassesession` echo commande "make install" >> ~/musescore/log echo $MOTDEPASSE | sudo -S make install >>~/musescore/log cd $MUSEPATH #building the name of the file to upload date=$(stat -c %y ./mscore/revision.h) jour=${date:0:10} heure=${date:11:2} minute=${date:14:2} fin=$(<./mscore/revision.h) nom="mscore.64bits-"$jour"-"$heure"-"$minute"-"$fin #creating the file to upload, cd ./build.release cd ./mscore tar -jcvf ../../../historique/$nom.tar.bz2 mscore cd ../../../historique/ #importing the upload identifier from auxiliary file ftp_site=prereleases.musescore.org username=`cat ../identifiant` passwd=`cat ../motdepasse` echo commande "ftp" >> ~/musescore/log ftp -n -i $ftp_site <>~/musescore/log quit EOF # displaying the internet page to advise that an upload took place firefox --display=:0 -new-window http://prereleases.musescore.org/linux/nightly/ #fi exit 0