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 fi