#!/usr/bin/env bash
# vim: set ft=bash:

set -e

if [ $# -lt 1 ]; then
  echo "Not enough arguments"
  echo 'usage: ./setup basename'
  exit 1
fi

nameBase=$1
files=(
  "flake.nix"
  ".gitignore"
  "pyproject.toml"
  "rename/main.py"
)

for file in ${files[@]}; do
    sed -i "
    s/rename/$nameBase/g;
    " $file
done

mv rename $nameBase
