Skip to content

Commit 5c44bdd

Browse files
committedAug 13, 2021
docs: README.md
1 parent 41aa1eb commit 5c44bdd

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
 

‎README.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
# Bash Project
22

33
My bash project template.
4+
5+
## Features
6+
7+
- Directory structure with high maintainability and scalability
8+
- Unit test with [shellspec](https://github.com/shellspec/shellspec)
9+
- Develop on VSCode remote containers
10+
11+
## Usage
12+
13+
```sh
14+
git clone https://github.com/m5d215/bash-project.git your-project-name
15+
cd your-project-name
16+
./init your-project-name
17+
```

‎init.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
set -Ceuo pipefail
4+
5+
PROJECT_NAME=$1
6+
ROOT_DIR=$(cd -- "${0%/*}" && pwd)
7+
8+
mv "$ROOT_DIR/lib/"{PROJECT_NAME,$PROJECT_NAME}
9+
mv "$ROOT_DIR/libexec/"{PROJECT_NAME,$PROJECT_NAME}
10+
11+
sed -i -e "s/PROJECT_NAME/$PROJECT_NAME/g" bin/*
12+
13+
cat <<EOT >|"$ROOT_DIR/README.md"
14+
# $PROJECT_NAME
15+
EOT
16+
17+
rm "$0"

0 commit comments

Comments
 (0)
Please sign in to comment.