16 lines
333 B
Plaintext
16 lines
333 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
if [ $# -lt 1 ];then
|
||
|
echo "Failed get arguments"
|
||
|
echo "./newpyproject [project name]"
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
mkdir $1
|
||
|
cd $1
|
||
|
git init
|
||
|
poetry init
|
||
|
cp ~/.config/pyright/pyrightconfig.json .
|
||
|
venv_path=$(poetry env info -p)
|
||
|
echo -e $(jq -r --arg path "$venv_path" '.venvPath |= $path' pyrightconfig.json) > pyrightconfig.json
|