diff options
Diffstat (limited to 'recipes-ti/matrix/matrix-gui-apps.inc')
-rw-r--r-- | recipes-ti/matrix/matrix-gui-apps.inc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-ti/matrix/matrix-gui-apps.inc b/recipes-ti/matrix/matrix-gui-apps.inc new file mode 100644 index 00000000..9449c062 --- /dev/null +++ b/recipes-ti/matrix/matrix-gui-apps.inc | |||
@@ -0,0 +1,40 @@ | |||
1 | require matrix-gui-paths.inc | ||
2 | |||
3 | MATRIX_FILES_DIR ?= ${S} | ||
4 | |||
5 | # Append a generic function to the do_install step that will look in the | ||
6 | # MATRIX_FILES_DIR for .desktop files and then: | ||
7 | # 1. Install all non-script files into the MATRIX_APP_DIR | ||
8 | # 2. Install all script files into ${bindir} | ||
9 | do_install_append(){ | ||
10 | cd ${MATRIX_FILES_DIR} | ||
11 | applist=`find . -name "*.desktop"` | ||
12 | |||
13 | for app in $applist | ||
14 | do | ||
15 | appdir=`dirname $app` | ||
16 | install -d ${D}${MATRIX_APP_DIR}/$appdir | ||
17 | |||
18 | # Get the non-script files which are the matrix metadata | ||
19 | matrix_apps=`find $appdir -type f ! -name "*\.sh"` | ||
20 | for m in $matrix_apps | ||
21 | do | ||
22 | install -m 0644 ${MATRIX_FILES_DIR}/$m ${D}${MATRIX_APP_DIR}/$appdir/ | ||
23 | done | ||
24 | |||
25 | # Put the script files as executables in ${bindir} | ||
26 | scripts=`find $appdir -type f -name "*\.sh"` | ||
27 | for s in $scripts | ||
28 | do | ||
29 | if [ ! -d ${D}/${bindir} ] | ||
30 | then | ||
31 | install -d ${D}${bindir} | ||
32 | fi | ||
33 | install -m 0755 ${MATRIX_FILES_DIR}/$s ${D}${bindir}/ | ||
34 | done | ||
35 | done | ||
36 | |||
37 | # Go back to the directory we started from in case there are | ||
38 | # other appends. | ||
39 | cd - | ||
40 | } | ||