File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Bash Project
2
2
3
3
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
+ ```
Original file line number Diff line number Diff line change
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 "
You can’t perform that action at this time.
0 commit comments