dotfiles-remastered/.local/share/scripts/new-project.sh

30 lines
443 B
Bash
Raw Normal View History

2023-09-05 15:08:38 +00:00
#!/bin/bash
set -e
TYPES="Golang,Vite"
CHOISE=$(echo $TYPES | tr "," "\n" | fzf)
if [ -z "$CHOISE" ]; then
echo "No choise"
exit 1
fi
cd $HOME/projects
case $CHOISE in
Golang)
cookiecutter https://git.kapelle.org/niklas/cookiecutter-golang
;;
Vite)
npm create vite@latest
;;
*)
echo "Unknown"
;;
esac
ls -ltd ./*/ | head -n 1 | awk '{print $9}' | xargs -I {} code {}