#!/bin/bash
set -euo pipefail
cd -- "$(dirname -- "$0")"

function main() {
  local dotfile
  for dotfile in .*; do
    [[ $dotfile =~ ^(\.\.?|\.git)$ ]] && continue

    dotfile=$(realpath "$dotfile")
    (
      cd
      ln -svf "$dotfile" .
    )
  done
}

main