templates/python: init

This commit is contained in:
Infinidoge 2025-01-20 14:44:59 -05:00
parent adc5376072
commit e6e80da7e3
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
7 changed files with 157 additions and 0 deletions

26
templates/python/setup Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
# vim: set ft=bash:
set -e
if [ $# -lt 3 ]; 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