templates/python: init
This commit is contained in:
parent
adc5376072
commit
e6e80da7e3
7 changed files with 157 additions and 0 deletions
26
templates/python/setup
Executable file
26
templates/python/setup
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue