updated kfg to install ghostty integration correctly - fixed

This commit is contained in:
Christopher Beckmann
2025-01-10 12:42:49 +01:00
parent 04243284a1
commit 1f896e3bb5

12
kfg
View File

@@ -190,17 +190,13 @@ function prepend_rc {
# Add the file to the rc file as source $file
SOURCE_CMD="$1"
RC="$HOME_PATH/$RC_FILE"
case `grep -Fox "${SOURCE_CMD}" "$RC"> /dev/null; echo $?` in
1)
local out=`grep -Fox "${SOURCE_CMD}" "$RC"`
if [ -z "$out" ]; then
sed -i "1i${SOURCE_CMD//$'\n'/\\n}" "$RC"
log_add "Added \"$SOURCE_CMD\" to $RC"
;;
0)
else
log_debug "\"$SOURCE_CMD\" already in $RC"
;;
*)
log_error "Error occured trying to add $SOURCE_CMD to $RC"
esac
fi
}
function download {