Ignore:
Timestamp:
May 4, 2017, 1:31:09 PM (2 years ago)
Author:
Juanma
Message:

Added support to old rules file format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devtools/desktop_to_xml/desktop_to_xml.sh

    r4566 r4574  
    1818msg_desktop_updated="\nDesktop file updated.\n"
    1919msg_icon_found="Icon %s found.\nGenerating llx-resources dir\n"
    20 msg_icon_not_found="\nNo icon named %s found on dirs %s, %s or %s\n"
    21 msg_icon_location_info="\nPlease add %s as svg to %s and relaunch this program or  use the llxsrc debhelper. Until then the app will not be included in our software store.\n"
    22 msg_icon_exists="\nIcon package found on the right location. Assuming llxsrc helper exists in rules\n"
     20msg_icon_not_found="\nNo icon named %s found on dirs %s, %s or %s\nRemember that the icon must be in SVG format and no in PNG or other image format\n"
     21msg_icon_location_info="\nPlease add %s as svg to %s and relaunch this program or use the llxsrc debhelper. Until then the app will not be included in our software store.\n"
     22msg_icon_exists="\nIcon package found on the right location. Checking if llxsrc helper exists in rules\n"
    2323msg_work_done="\n----------\n\nWork done. If the process has no errors please check that the appfile.xml is right and that the rules file has the llxsrc helper. Also check that the icon is present in llx-resources.\nIn other case correct the errors and relaunch the script.\n\nRemember that the generated appfile.xml isn't a full one and is missing some fields like the screenshots. Take a cup of coffee and fulfill the empty fields following the specs at https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html\n\n"
    2424msg_install_not_found="Install file not found in debian dir. Aborting.\n"
    2525msg_select_workdir="Select the workdir\n"
    2626msg_debhelper_enabled="package type llxsrc detected. Setting llx-resources as workdir\n"
     27msg_rules_old_format="\n********** WARNING!!!! **********\nrules file has an old format.\nIt's HIGHLY recommended to update it to the new rules format.\n *************************** \n"
     28
    2729function usage_help
    2830{
     
    4143        srcDir=${1}"/trunk/fuentes"
    4244        debianDir=${1}"/trunk/fuentes/debian"
    43 
    4445        lliurexArtworkDir=${svnDir}"/vibrancy-colors/trunk/fuentes/vibrancy-lliurex/apps"
    45 #vibrancyArtworkDir=${svnDir}"/vibrancy-colors/trunk/fuentes/vibrancy-colors/Vibrancy-Dark-Orange/apps/scalable"
    4646        if [ ! -d $lliurexArtworkDir ] || [ ! -d $vibrancyArtworkDir ]
    4747        then
     
    9999                        for directory in *
    100100                        do
    101                                 printf "${count}) $directory\n"
    102101                                dirArray[$count]=$directory
    103102                                let count++
     
    113112{
    114113        installFile=$1
    115         wc -l $installFile
    116114        if [ `wc -l $installFile  | cut -f1 -d ' '` -gt 1 ]
    117115        then
     
    332330                        cp ${iconPath}"/"${iconFile} ${srcDir}"/"${resourcesDir}
    333331                        cd $OLDPWD
    334                         add_llxsrc_helper
    335332                else
    336333                        printf "$msg_icon_not_found" ${iconName} $lliurexArtworkDir $resourcesDir $installDir
    337334                        printf "$msg_icon_location_info" ${iconName} $lliurexArtworkDir
     335                        exit 1
    338336                fi
    339337        else
    340338                printf "$msg_icon_exists"
    341339        fi
     340        add_llxsrc_helper
    342341}
    343342
     
    349348        if [[ ! `grep 'llxsrc' rules` ]]
    350349        then
    351                 if [[ `grep '\-\-with' rules` ]]
    352                 then
    353                         sed -i 's/\(dh $@\ --with\ \)/\0llxsrc,/' rules
    354                 else
    355                         sed -i 's/\(dh $@\ \)/\0 --with\ llxsrc\ /' rules
     350                if [[ `grep 'dh \$@' rules` ]]
     351                then
     352                        if [[ `grep '\-\-with' rules` ]]
     353                        then
     354                                sed -i 's/\(dh $@\ --with\ \)/\0llxsrc,/' rules
     355                        else
     356                                sed -i 's/\(dh $@\ \)/\0 --with\ llxsrc\ /' rules
     357                        fi
     358                else
     359                        printf "$msg_rules_old_format"
     360                        sed -i 's/\tdh_installdeb/\tdh_llxsrcinstall\n\tdh_installdeb/' rules
    356361                fi
    357362        fi
Note: See TracChangeset for help on using the changeset viewer.