mirror of https://github.com/davatorium/rofi.git
Follow symlink before writing config file. Fixes #884
This commit is contained in:
parent
8ea484349b
commit
5d50ae45cd
|
@ -171,14 +171,16 @@ function set_theme()
|
||||||
fi
|
fi
|
||||||
if [ -f "${CDIR}/config.rasi" ]
|
if [ -f "${CDIR}/config.rasi" ]
|
||||||
then
|
then
|
||||||
${SED} -i "/@import.*/d" "${CDIR}/config.rasi"
|
get_link=$(readlink -f "${CDIR}/config.rasi")
|
||||||
echo "@import \"${1}\"" >> "${CDIR}/config.rasi"
|
${SED} -i "/@import.*/d" "${get_link}"
|
||||||
|
echo "@import \"${1}\"" >> "${get_link}"
|
||||||
else
|
else
|
||||||
if [ -f "${CDIR}/config" ]
|
if [ -f "${CDIR}/config" ]
|
||||||
then
|
then
|
||||||
${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
|
get_link=$(readlink -f "${CDIR}/config")
|
||||||
|
${SED} -i "/rofi\.theme: .*\.rasi$/d" "${get_link}"
|
||||||
fi
|
fi
|
||||||
echo "rofi.theme: ${1}" >> "${CDIR}/config"
|
echo "rofi.theme: ${1}" >> "${get_link}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue