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" ;; |
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 |
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} \ |