From 6ae1e27c0ea51cc4a29b03ef0af3df143389df9c Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 1 Dec 2020 01:13:40 +0100 Subject: [PATCH] Broaden the scope of vcs-init and rename it --- scripts/.local/share/scripts/project-init | 32 +++++++++++++++++++++++ scripts/.local/share/scripts/vcs-init | 11 -------- 2 files changed, 32 insertions(+), 11 deletions(-) create mode 100755 scripts/.local/share/scripts/project-init delete mode 100755 scripts/.local/share/scripts/vcs-init diff --git a/scripts/.local/share/scripts/project-init b/scripts/.local/share/scripts/project-init new file mode 100755 index 0000000..e3df228 --- /dev/null +++ b/scripts/.local/share/scripts/project-init @@ -0,0 +1,32 @@ +#!/bin/sh + +usage(){ + echo "Usage: project-init " + echo "type git: VCS project" + echo "type src: Simple coding project" + echo "type doc: Assignment" + exit 1 +} + +if [ $# != 1 ]; then + 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 +elif [ "$type" = "doc" ]; then + mkdir docs docs/assets + touch docs/Summary.org +else + usage +fi diff --git a/scripts/.local/share/scripts/vcs-init b/scripts/.local/share/scripts/vcs-init deleted file mode 100755 index 0a0e97c..0000000 --- a/scripts/.local/share/scripts/vcs-init +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -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