mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Follow symlink before writing config file. Fixes #884
This commit is contained in:
parent
8ea484349b
commit
5d50ae45cd
1 changed files with 6 additions and 4 deletions
|
@ -171,14 +171,16 @@ function set_theme()
|
|||
fi
|
||||
if [ -f "${CDIR}/config.rasi" ]
|
||||
then
|
||||
${SED} -i "/@import.*/d" "${CDIR}/config.rasi"
|
||||
echo "@import \"${1}\"" >> "${CDIR}/config.rasi"
|
||||
get_link=$(readlink -f "${CDIR}/config.rasi")
|
||||
${SED} -i "/@import.*/d" "${get_link}"
|
||||
echo "@import \"${1}\"" >> "${get_link}"
|
||||
else
|
||||
if [ -f "${CDIR}/config" ]
|
||||
then
|
||||
${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
|
||||
get_link=$(readlink -f "${CDIR}/config")
|
||||
${SED} -i "/rofi\.theme: .*\.rasi$/d" "${get_link}"
|
||||
fi
|
||||
echo "rofi.theme: ${1}" >> "${CDIR}/config"
|
||||
echo "rofi.theme: ${1}" >> "${get_link}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue