From 8b2a21af689f9c115b39be0631befd7d0e1c376f Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Tue, 5 Sep 2023 17:08:38 +0200 Subject: [PATCH] added new project script --- .local/share/scripts/new-project.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 .local/share/scripts/new-project.sh diff --git a/.local/share/scripts/new-project.sh b/.local/share/scripts/new-project.sh new file mode 100755 index 0000000..e915c84 --- /dev/null +++ b/.local/share/scripts/new-project.sh @@ -0,0 +1,29 @@ +#!/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 {}