Ignore:
Timestamp:
Sep 23, 2010, 11:39:54 AM (14 years ago)
Author:
mlg
Message:

changes the generation script :
variable names and comments in english.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/install/create_executables.sh

    r7006 r7007  
    11#!/bin/bash
    22## this script generates executables for jiwigo
    3 ## to use it, you have to download the "travail" directory
    4 ## here : http://www.le-guevel.com/jiwigo/downloads/travail.tar.gz
    5 ## you just have to change travail_path to indicate the path to "travail"
     3## to use it, you have to download the "work" directory
     4## here : http://www.le-guevel.com/jiwigo/downloads/work.tar.gz
     5## you just have to change work_path to indicate the path to "work"
    66## and "project_path" to the path of the project.
    77## you have to run the mvn jar command before launching this script
    8 ## the mvn command is written in the install file of the project : install.txt
     8## the mvn command is writter in the install file of the project : install/install.txt
    99## all the generated files will be moved to the "generation" directory.
    10 travail_path='/home/mael/Documents/Jiwigo/travail'
     10work_path='/home/mael/Documents/Jiwigo/travail'
    1111project_path='/home/mael/workspace/jiwigo'
    1212target_path=$project_path/target
    1313
    1414###############################################################################################
    15 #####################           Construction du deb              ##############################
     15#####################           building deb                     ##############################
    1616###############################################################################################
    1717
    18 #calcul de la taille et de la version, pour compléter le fichier control de debian
    19 taille=`du -cs jiwigo`
    20 taille=`echo $taille | cut -d ' ' -f 1`
     18#Calculate size and version to complete debian's control file
     19size=`du -cs jiwigo`
     20size=`echo $size | cut -d ' ' -f 1`
    2121version=`find $target_path -type f -name \*with-dependencies.jar | xargs -I file echo file | cut -d '-' -f 2`
    22 cp $travail_path/control $travail_path/temp
    23 echo Version: $version >> $travail_path/temp
    24 echo Installed-Size: $taille >> $travail_path/temp
    25 rm $travail_path/jiwigo/DEBIAN/control
    26 mv temp $travail_path/jiwigo/DEBIAN/control
     22cp $work_path/control $work_path/temp
     23echo Version: $version >> $work_path/temp
     24echo Installed-Size: $size >> $work_path/temp
     25rm $work_path/jiwigo/DEBIAN/control
     26mv temp $work_path/jiwigo/DEBIAN/control
    2727
    28 #copie des sources
    29 rm -rf $travail_path/jiwigo/usr/share/jiwigo/src/src-jiwigo/*
    30 cp -r $project_path/src/* $travail_path/jiwigo/usr/share/jiwigo/src/src-jiwigo/
     28#copies sources
     29rm -rf $work_path/jiwigo/usr/share/jiwigo/src/src-jiwigo/*
     30cp -r $project_path/src/* $work_path/jiwigo/usr/share/jiwigo/src/src-jiwigo/
    3131
    32 #copie du jar
    33 rm $travail_path/jiwigo/usr/share/jiwigo/jiwigo.jar
    34 find $target_path -type f -name \*with-dependencies.jar -exec cp {} $travail_path/jiwigo/usr/share/jiwigo/jiwigo.jar \;
     32#copies the jar
     33rm $work_path/jiwigo/usr/share/jiwigo/jiwigo.jar
     34find $target_path -type f -name \*with-dependencies.jar -exec cp {} $work_path/jiwigo/usr/share/jiwigo/jiwigo.jar \;
    3535
    36 #suppression des fichiers temporaires
    37 find "$travail_path" | egrep "~$" | perl -n -e 'system("rm $_");'
     36#delete temporary files
     37find "$work_path" | egrep "~$" | perl -n -e 'system("rm $_");'
    3838
    39 #changement du répertoire
    40 cd "$travail_path"
     39#changes current directory
     40cd "$work_path"
    4141
    42 #construction du deb
     42#makes deb
    4343dpkg-deb --build jiwigo
    4444
    45 rm "$travail_path/depot/jiwigo.deb"
    46 rm "$travail_path/depot/Packages.gz"
    47 #déplacement du deb
    48 mv -f "$travail_path/jiwigo.deb" "$travail_path/depot/jiwigo.deb"
     45rm "$work_path/depot/jiwigo.deb"
     46rm "$work_path/depot/Packages.gz"
     47#moves deb
     48mv -f "$work_path/jiwigo.deb" "$work_path/depot/jiwigo.deb"
    4949
    50 #construction de Packages.gz
    51 cd "$travail_path/depot"
     50#makes Packages.gz
     51cd "$work_path/depot"
    5252dpkg-scanpackages . /dev/null | gzip - > Packages.gz
    5353
    5454
    5555###############################################################################################
    56 #####################           Construction du exe              ##############################
     56#####################           Building    exe                  ##############################
    5757###############################################################################################
    5858
    59 $travail_path/launch4j/launch4j $travail_path/launch4j.xml
     59$work_path/launch4j/launch4j $work_path/launch4j.xml
    6060
    6161###############################################################################################
    62 #####################           du dossier de generation         ##############################
     62#####################           completes generation folder      ##############################
    6363###############################################################################################
    6464
    65 rm $travail_path/generation/*
    66 cp $travail_path/jiwigo.exe $travail_path/generation/
    67 cp $travail_path/depot/jiwigo.deb $travail_path/generation/
    68 cp $travail_path/jiwigo/usr/share/jiwigo/jiwigo.jar $travail_path/generation/
    69 tar -zcf $travail_path/generation/jiwigo-src.tar.gz $project_path/src/*
     65rm $work_path/generation/*
     66cp $work_path/jiwigo.exe $work_path/generation/
     67cp $work_path/depot/jiwigo.deb $work_path/generation/
     68cp $work_path/jiwigo/usr/share/jiwigo/jiwigo.jar $work_path/generation/
     69tar -zcf $work_path/generation/jiwigo-src.tar.gz $project_path/src/*
Note: See TracChangeset for help on using the changeset viewer.