File: CheckForFiles

package info (click to toggle)
fvwm-crystal 3.4.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 21,708 kB
  • sloc: sh: 3,265; cs: 1,335; python: 875; makefile: 214
file content (48 lines) | stat: -rw-r--r-- 1,530 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Function CheckForFiles for FVWM-Crystal
#
# Version:	1.1.1
# License: 	GPL 3+
#
# Author:	Dominique Michel <dominique_libre@users.sourceforge.net>	
#
# Created:	04/19/2014
# Changed:	08/09/2014
#
# Description:	This file check for preference and application database files and launch the Preferences Editor or fvwm-crystal.generate-menu accordingly.

# Load date for last installed package with a desktop file
LoadPreferences DateLastApp
LoadPreferences XDGMenu
# Load the system editor
LoadPreferences EDITOR

# check for preferences files
# CheckPrefFile <filename>
DestroyFunc CheckPrefFile
AddToFunc CheckPrefFile
+ I PipeRead 'if [ ! -f "${FVWM_USERDIR}/preferences/$0" ]; \
	then cp -R "${FVWM_SYSTEMDIR}/preferences/$0" "${FVWM_USERDIR}/preferences/$0"; \
		echo "SetEnv PrefEd 1"; \
	fi'

# check for applications database in the user directory
# and for date of the desktop files
DestroyFunc CheckApplicationsDatabase
AddToFunc CheckApplicationsDatabase
+ I PipeRead 'if [ ! -d "${FVWM_USERDIR}/Applications" ]; then \
		echo "A fvwm-crystal.generate-menu ${FVWM_SYSTEMDIR} ${FVWM_USERDIR}"; \
		echo "A ${FVWM_SYSTEMDIR}/scripts/XDG-Menu"; \
		else ${FVWM_SYSTEMDIR}/scripts/CheckMenuDate; fi'

CheckPrefFile MediaDirectories
CheckPrefFile DesktopDirs
CheckPrefFile IconDirs
CheckPrefFile BROWSER
CheckPrefFile EDITOR
CheckPrefFile Startup
CheckPrefFile FullScreenApps
CheckPrefFile ShowDirectories
CheckApplicationsDatabase
Test (EnvIsSet PrefEd) Script scripts/PrefVars/PrefVars
UnsetEnv PrefEd
UnsetEnv DateLastApp