16 lines
333 B
Bash
Executable File
16 lines
333 B
Bash
Executable File
#!/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
|