updated kfg to install ghostty integration correctly - fixed
This commit is contained in:
18
kfg
18
kfg
@@ -190,17 +190,13 @@ function prepend_rc {
|
|||||||
# Add the file to the rc file as source $file
|
# Add the file to the rc file as source $file
|
||||||
SOURCE_CMD="$1"
|
SOURCE_CMD="$1"
|
||||||
RC="$HOME_PATH/$RC_FILE"
|
RC="$HOME_PATH/$RC_FILE"
|
||||||
case `grep -Fox "${SOURCE_CMD}" "$RC"> /dev/null; echo $?` in
|
local out=`grep -Fox "${SOURCE_CMD}" "$RC"`
|
||||||
1)
|
if [ -z "$out" ]; then
|
||||||
sed -i "1i${SOURCE_CMD//$'\n'/\\n}" "$RC"
|
sed -i "1i${SOURCE_CMD//$'\n'/\\n}" "$RC"
|
||||||
log_add "Added \"$SOURCE_CMD\" to $RC"
|
log_add "Added \"$SOURCE_CMD\" to $RC"
|
||||||
;;
|
else
|
||||||
0)
|
log_debug "\"$SOURCE_CMD\" already in $RC"
|
||||||
log_debug "\"$SOURCE_CMD\" already in $RC"
|
fi
|
||||||
;;
|
|
||||||
*)
|
|
||||||
log_error "Error occured trying to add $SOURCE_CMD to $RC"
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function download {
|
function download {
|
||||||
|
|||||||
Reference in New Issue
Block a user