Changeset 4566
- Timestamp:
- May 4, 2017, 12:08:25 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devtools/desktop_to_xml/desktop_to_xml.sh
r4555 r4566 22 22 msg_icon_exists="\nIcon package found on the right location. Assuming llxsrc helper exists in rules\n" 23 23 msg_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" 24 msg_install_not_found=" No install file presentin debian dir. Aborting.\n"24 msg_install_not_found="Install file not found in debian dir. Aborting.\n" 25 25 msg_select_workdir="Select the workdir\n" 26 26 msg_debhelper_enabled="package type llxsrc detected. Setting llx-resources as workdir\n" … … 60 60 index=0 61 61 let count-- 62 if [ $count -gt 0 ] 63 then 64 printf "$msg_select_file" 65 for i in `seq 0 ${count}` 66 do 67 printf "${i}) ${installFiles[$i]}\n" 68 done 69 printf "Select file [0]: " 70 read index 71 [ -z $index ] && index=0 72 installFile=${installFiles[$index]} 73 printf "$msg_selected_file" $installFile 74 process_installFile ${installFile} 75 elif [[ $installFiles[0]=='*install' ]] 62 if [[ ${installFiles[0]} = '*install' ]] 76 63 then 77 64 printf "$msg_install_not_found" 78 65 get_workdir 79 66 debhelper_mode=1 67 else 68 if [ $count -gt 0 ] 69 then 70 printf "$msg_select_file" 71 for i in `seq 0 ${count}` 72 do 73 printf "${i}) ${installFiles[$i]}\n" 74 done 75 printf "Select file [0]: " 76 read index 77 [ -z $index ] && index=0 78 installFile=${installFiles[$index]} 79 else 80 installFile=${installFiles[0]} 81 fi 82 printf "$msg_selected_file" $installFile 83 process_installFile ${installFile} 80 84 fi 81 85 } … … 109 113 { 110 114 installFile=$1 115 wc -l $installFile 111 116 if [ `wc -l $installFile | cut -f1 -d ' '` -gt 1 ] 112 117 then … … 134 139 { 135 140 cd $rootDir"/"$srcDir 136 printf "Entering $1\n" 137 cd $1 141 wrkDir=$1 142 printf "Entering $wrkDir\n" 143 if [ -d wrkDir ] 144 then 145 cd $wrkDir 146 else 147 wrkDir=`dirname $wrkDir` 148 cd $wrkDir 149 fi 150 138 151 #Find the desktop file of the application 139 152 desktopFiles=$(find . -name "*.desktop") … … 142 155 do 143 156 cd $rootDir"/"$srcDir 144 printf "Entering $1\n" 145 cd $1 146 metainfoDir=`dirname $desktopFile` 147 metainfoDir=`dirname $metainfoDir`"/metainfo" 157 printf "Entering $wrkDir\n" 158 cd $wrkDir 159 #If workdir != $1 then it means that the install file has a file and not a dir 160 #In this case we assume that the install is putting the desktop file so metainfoDir becames llx-resources directly 161 if [[ $wrkDir != $1 ]] 162 then 163 appName=$(basename $pkgDir) 164 metainfoDir=${rootDir}"/"${srcDir}"/llx-resources/"${appName} 165 else 166 metainfoDir=`dirname $desktopFile` 167 metainfoDir=`dirname $metainfoDir` 168 fi 169 metainfoDir=$metainfoDir"/metainfo" 148 170 mkdir $metainfoDir -p 149 171 parse_desktop $metainfoDir $desktopFile … … 305 327 cd $srcDir 306 328 appName=$(basename $pkgDir) 307 resourcesDir="llx-resources/"${appName}"/icons/ "329 resourcesDir="llx-resources/"${appName}"/icons/apps/" 308 330 mkdir $resourcesDir -p 309 331 cd $OLDPWD
Note: See TracChangeset
for help on using the changeset viewer.