Follow symlink before writing config file. Fixes #884
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user