<commit_before>#!/bin/bash

make_link()
{
  local name="$1"
  local target="$(realpath "$CONFIG_ROOT/$1")"
  local link_path="$2"

  if [ -f "$link_path" ] || [ -L "$link_path" ]
  then
      echo "backing up previous $name"
      mv "$link_path" "$link_path.prev"
  fi

  echo "linking $name"
  ln -s "$target" "$link_path"

  echo
}

set -x

CONFIG_ROOT="$(realpath "$1")"

make_link XCompose "$HOME/.XCompose"

mkdir -p "$HOME/.bashrc.d"
make_link bashrc_ibus "$HOME/.bashrc.d/0_ibus"<commit_msg>Fix keyboard config<commit_after>#!/bin/bash

make_link()
{
  local name="$1"
  local target="$(realpath "$CONFIG_ROOT/$1")"
  local link_path="$2"

  if [ -f "$link_path" ] || [ -L "$link_path" ]
  then
      echo "backing up previous $name"
      mv "$link_path" "$link_path.prev"
  fi

  echo "linking $name"
  ln -s "$target" "$link_path"

  echo
}


CONFIG_ROOT="$(realpath "$1")"

make_link XCompose "$HOME/.XCompose"

mkdir -p "$HOME/.bashrc.d"
make_link bashrc_ibus "$HOME/.bashrc.d/0_ibus"
{'fraction_non_alphanumeric': 0.1855566700100301, 'fraction_numerical': 0.010030090270812437, 'mean_word_length': 3.663551401869159, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2727367', 'n_tokens_mistral': 425, 'n_tokens_neox': 391, 'n_words': 89}