Broaden the scope of vcs-init and rename it

This commit is contained in:
coolneng 2020-12-01 01:13:40 +01:00
parent 8cd381e119
commit 6ae1e27c0e
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 32 additions and 11 deletions

View File

@ -0,0 +1,32 @@
#!/bin/sh
usage(){
echo "Usage: project-init <type>"
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

View File

@ -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