Script to automatically build qutIM from SVN under Linux

    This is not even a script, but two whole small scripts: for updating from svn and assembly. :) Quickly threw it, because the project is developing dynamically and I want to test new versions.

    Details below ...

    First you need to create a folder structure:
    1) Create a folder with the name qutim, well, you can with another
    2) Make cd into it.
    3) svn co http://qutim.org/svn/qutim/trunk qutim-svn
    4) svn co http://qutim.org/svn/languages languages
    5) mkdir plugins
    6) cd qutim-svn / plugins
    7) svn co http://qutim.org/svn/icq/trunk icq
    8) svn co http://qutim.org/svn/jabber/trunk jabber
    9) In the languages ​​folder, go to the folder with the desired language and create a link to binaries and drop it into the languages ​​folder

    Now you need to drop two scripts into the created folder.

    check.sh:
         echo “qutim update”
         cd `dirname $ 0` / qutim-svn
         svn update
         echo“ qutim-icq update ”
         cd“ dirname $ 0` / qutim-svn / plugins / icq
         svn update
         echo “qutim-jabber update”
         cd `dirname $ 0` / qutim-svn / plugins / jabber
         svn update
         echo" languages ​​update "
         cd` dirname $ 0` / languages
         svn update

         read var

    build.sh:
         echo “build qutim”
         cd `dirname $ 0` / qutim-svn /
         mkdir qutim-temp
         cd qutim-temp
         cmake ...
         echo "OK?"
         read var
         make -j4
         echo "OK?"
         read var
         rm `dirname $ 0` / qutim.old mv`
         dirname $ 0` / qutim `dirname $ 0` / qutim. old
         mv qutim `dirname $ 0` / qutim
         rm -rf` dirname $ 0` / qutim-svn / qutim-temp /
         echo "build qutim-icq"
         cd `dirname $ 0` / qutim-svn / plugins / icq /
         qmake-qt4
         make -j4
         echo “OK?”
         read var
         rm `dirname $ 0` / plugins / libicq.so.old mv`
         dirname $ 0` / plugins / libicq.so `dirname $ 0` / plugins / libicq.so.old
         mv libicq.so `dirname $ 0` / plugins / libicq.so
         make clean
         make distclean

         echo" build qutim-jabber "
         cd` dirname $ 0` / qutim-svn / plugins / jabber /
         mkdir jabber-temp
         cd jabber-temp
         cmake -DGNUTLS = 1 ...
         echo “OK?”      Read
         var
    make -j4
         echo “OK?”
         Read var
         rm `dirname $ 0` / plugins / libjabber.so.old mv`
         dirname $ 0` / plugins / libjabber.so `dirname $ 0` / plugins /libjabber.so.old
         mv libjabber.so `dirname $ 0` / plugins / libjabber.so
         rm -rf` dirname $ 0` / qutim-svn / plugins / jabber / jabber-temp /

         echo “finish!”
         read var

    Do not forget to give rights to run scripts. -j4 is the number of threads, this number is relevant for those with more than 4 cores :)), you can change it. At stops, the script waits for Enter. Each action is followed by a stop. For example, if an error occurred during assembly, then DO NOT press Enter, but press CTRL + C in the terminal and stop the script. The script before replacing the file with a freshly assembled one, saves the old one, you can always roll it back. Now your whole qutIM world is concentrated in one folder! :)) The qutim startup file appears in this folder. You can run it: ./qutim or make a shortcut somewhere.

    Please do not scold. If you use bash directly, then of course you can automate everything :)). But so far I'm happy with that.

    Also popular now: