Pass location of exports to triggers as arg1

This changes nothing but is a preparation for later changes
tingping/wmclass
Alexander Larsson 2016-02-09 14:50:35 +01:00
parent 0bfb064030
commit 5dfc59ee02
4 changed files with 14 additions and 13 deletions

View File

@ -1158,6 +1158,7 @@ xdg_app_dir_run_triggers (XdgAppDir *self,
g_ptr_array_add (argv_array, g_strdup ("-F"));
g_ptr_array_add (argv_array, g_strdup ("/usr"));
g_ptr_array_add (argv_array, g_file_get_path (child));
g_ptr_array_add (argv_array, g_strdup ("/app"));
g_ptr_array_add (argv_array, NULL);
if (!g_spawn_sync ("/",

View File

@ -1,5 +1,5 @@
#!/bin/sh
if test \( -x "$(which update-desktop-database 2>/dev/null)" \) -a \( -d /app/exports/share/applications \); then
exec update-desktop-database -q /app/exports/share/applications
if test \( -x "$(which update-desktop-database 2>/dev/null)" \) -a \( -d $1/exports/share/applications \); then
exec update-desktop-database -q $1/exports/share/applications
fi

View File

@ -1,13 +1,13 @@
#!/bin/sh
if test \( -x "$(which gtk-update-icon-cache 2>/dev/null)" \) -a \( -d /app/exports/share/icons/hicolor \); then
cp /usr/share/icons/hicolor/index.theme /app/exports/share/icons/hicolor/
for dir in /app/exports/share/icons/*; do
if test -f $dir/index.theme; then
if ! gtk-update-icon-cache --quiet $dir; then
echo "Failed to run gtk-update-icon-cache for $dir"
exit 1
fi
fi
if test \( -x "$(which gtk-update-icon-cache 2>/dev/null)" \) -a \( -d $1/exports/share/icons/hicolor \); then
cp /usr/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/
for dir in $1/exports/share/icons/*; do
if test -f $dir/index.theme; then
if ! gtk-update-icon-cache --quiet $dir; then
echo "Failed to run gtk-update-icon-cache for $dir"
exit 1
fi
fi
done
fi

View File

@ -1,5 +1,5 @@
#!/bin/sh
if test \( -x "$(which update-mime-database 2>/dev/null)" \) -a \( -d /app/exports/share/mime/packages \); then
exec update-mime-database /app/exports/share/mime
if test \( -x "$(which update-mime-database 2>/dev/null)" \) -a \( -d $1/exports/share/mime/packages \); then
exec update-mime-database $1/exports/share/mime
fi