summaryrefslogtreecommitdiff
blob: 721393675ee58175249625c253a9ffbf7b856684 (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
jxplorer_home=/usr/share/jxplorer/

home="${HOME}/.jxplorer"

if [ ! -d "${home}" ]; then
	mkdir -v "${home}"
	cp -v ${jxplorer_home}/connections.txt "${home}"
fi

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

if [ -d ${HOME}/.jxplorer ]; then
	try_create "${home}/dxconfig.txt"
	try_create "${home}/jxplorer.log"
	if [ ! -f ${HOME}/.jxplorer/connections.txt ]; then
		cp -v ${jxplorer_home}/connections.txt ${HOME}/.jxplorer
	fi
	for subdir in htmldocs icons images templates; do
		[[ ! -e "${home}/${subdir}" ]] && \
			ln -vs "${jxplorer_home}/${subdir}" "${home}/${subdir}"
	done
fi