From a6196c344e85372d15986925b6932d846d9012ed Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 16 Dec 2020 17:54:33 +0100 Subject: [PATCH] Add remote-git option in project-init --- scripts/.local/share/scripts/project-init | 47 ++++++++++++++--------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/scripts/.local/share/scripts/project-init b/scripts/.local/share/scripts/project-init index e3df228..b146a68 100755 --- a/scripts/.local/share/scripts/project-init +++ b/scripts/.local/share/scripts/project-init @@ -1,32 +1,41 @@ #!/bin/sh -usage(){ - echo "Usage: project-init " - echo "type git: VCS project" - echo "type src: Simple coding project" - echo "type doc: Assignment" - exit 1 +usage() { + echo "Usage: project-init " + echo "type git: VCS project" + echo "type remote-git: VCS project with README, LICENSE and tests" + echo "type src: Simple coding project" + echo "type doc: Assignment" + exit 1 } if [ $# != 1 ]; then - usage + usage fi type=$1 if [ "$type" = "git" ]; then - git init - touch README.org - cp ~/Documents/IT/gpl-3.0.md LICENSE.md - cp ~/Documents/IT/shell.nix . - mkdir src tests data - git add ./* - git commit -m "Initial commit" - lorri init - direnv allow + git init + cp ~/Documents/IT/shell.nix . + mkdir src data + git add ./* + git commit -m "Initial commit" + lorri init + direnv allow +elif [ "$type" = "remote-git" ]; then + git init + touch README.org + cp ~/Documents/IT/gpl-3.0.md LICENSE.md + cp ~/Documents/IT/shell.nix . + mkdir src tests data + git add ./* + git commit -m "Initial commit" + lorri init + direnv allow elif [ "$type" = "doc" ]; then - mkdir docs docs/assets - touch docs/Summary.org + mkdir docs docs/assets + touch docs/Summary.org else - usage + usage fi