dotfiles/bin/newpyproject
2022-10-21 13:15:28 +03:00

15 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