Magellan Linux

Diff of /trunk/include/xdg.sminc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

branches/magellan-next/include/xdg.sminc revision 9702 by niro, Thu Jan 5 15:20:14 2012 UTC trunk/include/xdg.sminc revision 12531 by niro, Wed Jun 6 20:39:04 2012 UTC
# Line 143  minstallxdg() Line 143  minstallxdg()
143   for i in $*   for i in $*
144   do   do
145   case $1 in   case $1 in
146   --srcdir|-s) shift; prefix="${SOURCEDIR}/${PNAME}/" ;;   --srcdir|-s) prefix="${SOURCEDIR}/${PNAME}/" ;;
147   --name|-n) shift; name="$1"; modify="1" ;;   --name|-n) shift; name="$1"; modify="1" ;;
148   --comment|-m) shift; comment="$1"; modify="1" ;;   --comment|-m) shift; comment="$1"; modify="1" ;;
149   --exec|-e) shift; exec="$1"; modify="1" ;;   --exec|-e) shift; exec="$1"; modify="1" ;;
# Line 153  minstallxdg() Line 153  minstallxdg()
153   --categories|-c) shift; categories="$1"; modify="1" ;;   --categories|-c) shift; categories="$1"; modify="1" ;;
154   --vendor|-v) shift; vendor="$1"; modify="1" ;;   --vendor|-v) shift; vendor="$1"; modify="1" ;;
155   --mimetypes|-x) shift; mimetypes="$1"; modify="1" ;;   --mimetypes|-x) shift; mimetypes="$1"; modify="1" ;;
156     --file|-f) shift; file="$1" ;;
157     --destination-file|-df) shift; destfile="$1" ;;
158     --destination-dir|-d) shift; destdir="$1" ;;
159   esac   esac
160   shift   shift
161   done   done
162    
163   file="${prefix}$1"   [[ ! -z ${prefix} ]] && file="${prefix}${file}"
   
  if [[ -n "$2" ]]  
  then  
  destfile="$2"  
  else  
  destfile="$(basename ${file})"  
  fi  
   
  if [[ -n "$3" ]]  
  then  
  destdir="$3"  
  else  
  destdir="/usr/share/applications"  
  fi  
164    
165     [[ -z ${destfile} ]] && destfile="$(basename ${file})"
166     [[ -z ${destdir} ]] && destdir="/usr/share/applications"
167   [[ -z ${file} ]] && die "No xdg desktop file given"   [[ -z ${file} ]] && die "No xdg desktop file given"
168    
169   # needed directory   # needed directory
# Line 180  minstallxdg() Line 171  minstallxdg()
171    
172   if [[ ${modify} = 1 ]]   if [[ ${modify} = 1 ]]
173   then   then
174   [[ ! -z ${name} ]] && cmdline+=" --set-name=\"${name}\""   [[ ! -z ${name} ]] && cmdline+=" --set-name=${name}"
175   [[ ! -z ${comment} ]] && cmdline+=" --set-comment=\"${comment}\""   [[ ! -z ${comment} ]] && cmdline+=" --set-comment=${comment}"
176   [[ ! -z ${exec} ]] && cmdline+=" --set-key=Exec --set-value=\"${exec}\""   [[ ! -z ${exec} ]] && cmdline+=" --set-key=Exec --set-value=\"${exec}\""
177   [[ ! -z ${icon} ]] && cmdline+=" --set-icon=\"${icon}\""   [[ ! -z ${icon} ]] && cmdline+=" --set-icon=${icon}"
178   [[ ! -z ${terminal} ]] && cmdline+=" --set-key=Terminal --set-value=false"   [[ ! -z ${terminal} ]] && cmdline+=" --set-key=Terminal --set-value=false"
179   [[ ! -z ${notify} ]] && cmdline+=" --set-key=StartupNotify --set-value=false"   [[ ! -z ${notify} ]] && cmdline+=" --set-key=StartupNotify --set-value=false"
180   [[ ! -z ${vendor} ]] && cmdline+=" --vendor \"${vendor}\""   [[ ! -z ${vendor} ]] && cmdline+=" --vendor ${vendor}"
181    
182   if [[ ! -z ${categories} ]]   if [[ ! -z ${categories} ]]
183   then   then
# Line 206  minstallxdg() Line 197  minstallxdg()
197   done   done
198   fi   fi
199    
200   desktop-file-install \   eval desktop-file-install \
201   --dir ${destdir} \   --dir ${BINDIR}/${destdir} \
202   --add-category X-Magellan-Application \   --add-category X-Magellan-Application \
203   ${cmdline} \   ${cmdline} \
204   ${file} \   ${file} \

Legend:
Removed from v.9702  
changed lines
  Added in v.12531