tmp.sh 908 Bytes
#!/bin/bash -x

TMPDIR="/tmp/${USER}/"

test -d ${TMPDIR} || mkdir ${TMPDIR}
for dir in \
	".cache" \
	".adobe" \
	".macromedia" \
	".mozilla/firefox" \
	".pentadactyl" \
	".scummvm/logs"
do
	test -d "${TMPDIR}${dir}" || mkdir -p "${TMPDIR}${dir}"
done

for file in \
	".dmenu_cache" \
	".scummvm/logs/scummvm.log"
do
	test -f "${TMPDIR}${file}" || touch "${TMPDIR}${file}"
done

FF_PROFILE='default'
FF_DIR="${HOME}/.mozilla/firefox/"
FF_PROFILE_DIR="${FF_DIR}${FF_PROFILE}/"
if [ ! -e "${FF_PROFILE_DIR}" ]
then
	mkdir -p "${FF_PROFILE_DIR}"
	cat >${FF_DIR}/profiles.ini <<-END
		[General]
		StartWithLastProfile=1

		[Profile0]
		Name=default
		IsRelative=1
		Path=${FF_PROFILE}
	END

	for element in ${HOME}/.mozilla/persistent/*
	do
		test "${element}" == "${HOME}/.mozilla/persistent/*" && break
		ln -s "${element}" "${FF_PROFILE_DIR}${element##*/}"
	done
fi

source .functions

# vim: set ts=4 sw=4: