Annotation of /mcore-src/trunk/mcore-tools/src/modules/fluxbox/fluxbox-rebuild-autostart.in
Parent Directory | Revision Log
Revision 2621 -
(hide annotations)
(download)
Fri Sep 25 12:38:56 2015 UTC (9 years ago) by niro
File size: 876 byte(s)
Fri Sep 25 12:38:56 2015 UTC (9 years ago) by niro
File size: 876 byte(s)
-make fluxbox dir configurable and include global fluxbox apps file on autostart rebuild
1 | niro | 2150 | #!/bin/bash |
2 | |||
3 | niro | 2253 | MCORE_LIBDIR="@@MCORE_LIBDIR@@" |
4 | niro | 2212 | source @@SYSCONFDIR@@/mcore/mcore.conf |
5 | niro | 2253 | source ${MCORE_LIBDIR}/include/common.global.class |
6 | niro | 2150 | |
7 | if [ ! -d ${MROOT}/${MCORE_CONFIG_PATH}/fluxbox/autostart ] | ||
8 | then | ||
9 | echo "'${MROOT}/${MCORE_CONFIG_PATH}/fluxbox/autostart' does not exist." | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | CONFIG="${MROOT}/${MCORE_UNPRIV_HOME}/.fluxbox/apps" | ||
14 | niro | 2621 | if [ ! -d ${MROOT}/${MCORE_UNPRIV_HOME}/@@FLUXBOX_USER_CONFIG_DIR@@ ] |
15 | niro | 2329 | then |
16 | niro | 2621 | install -o ${MCORE_UNPRIV_USER} -g ${MCORE_UNPRIV_GROUP} -d ${MROOT}/${MCORE_UNPRIV_HOME}/@@FLUXBOX_USER_CONFIG_DIR@@ |
17 | niro | 2329 | fi |
18 | niro | 2150 | clearconfig |
19 | niro | 2621 | # use global fluxbox apps file as default |
20 | if [ -f ${MROOT}/@@FLUXBOX_SHARED@@/apps ] | ||
21 | then | ||
22 | addconfig "$(< ${MROOT}/@@FLUXBOX_SHARED@@/apps)" | ||
23 | fi | ||
24 | for file in $(find ${MROOT}/${MCORE_CONFIG_PATH}/fluxbox/autostart -type f | sort) | ||
25 | niro | 2150 | do |
26 | addconfig "$(< ${file})" | ||
27 | done | ||
28 | |||
29 | # add a newline (maybe there is no crlf in the footer) | ||
30 | addconfig |