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

31 lines
444 B
Bash
Raw Permalink 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 {}
2023-10-17 22:38:17 +00:00