summaryrefslogtreecommitdiff
blob: 5fe640c7328a2e328ae6c6434c1b401de4045081 (plain)
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
jxplorer_home=@GENTOO_PORTAGE_EPREFIX@/usr/share/jxplorer/

home="${HOME}/.jxplorer"

if [ ! -d "${home}" ]; then
	mkdir -v "${home}"
fi

try_create() {
	[[ ! -f "${1}" ]] && touch "${1}"
}

if [ -d ${HOME}/.jxplorer ]; then
	for file in search_filters.txt bookmarks.txt quicksearch.txt ; do 
		try_create "${home}/${file}"
	done
	for file in security.default csvconfig.txt.default ; do 
		[[ ! -e "${home}/${file}" ]] && \
			ln -vs "${jxplorer_home}/${file}" "${home}/${subdir}"
	done
	for subdir in htmldocs icons images templates plugins language ; do
		[[ ! -e "${home}/${subdir}" ]] && \
			ln -vs "${jxplorer_home}/${subdir}" "${home}/${subdir}"
	done
fi