#!/bin/zsh

# remove our config from .lldbinit
LLDBINIT_PATH="$HOME/.lldbinit"
LLDBINIT_PATH=${LLDBINIT_PATH:A}

if [ ! -r "$LLDBINIT_PATH" ] ; then
  echo "Wasn't allowed to read the .lldbinit file" >&2
  exit 1 
fi

## remove our integration if there
TMPFILE=$(mktemp)
grep -v "Support/Kaleidoscope/" "$LLDBINIT_PATH" >"$TMPFILE" 
mv "$TMPFILE" "$LLDBINIT_PATH"
