Skip to content

Commit 6fa5c2d

Browse files
committed
Add example LICENSE.md and YEAR tag. Closes #5
1 parent de020df commit 6fa5c2d

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 {{COMPANY_FRIENDLY_NAME}}
3+
Copyright (c) 2020 3D Group
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

RUNME.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ read -e -p "Enter unity version: " -i "2019.4" UNITY_VERSION
99

1010
echo 'Replacing template strings...'
1111

12+
YEAR="$(date +'%Y')"
13+
1214
( shopt -s globstar dotglob;
1315
for file in **; do
1416
if [[ -f $file ]] && [[ -w $file ]] && [[ $file != 'RUNME.sh' ]] && [[ $file != Samples/** ]] && [[ $file != .git/** ]]; then
1517
echo "Altering file ${file}"
16-
replace="s/{{REPOSITORY_NAME}}/"${REPOSITORY_NAME}"/g;s/{{FRIENDLY_NAME}}/"${FRIENDLY_NAME}"/g;s/{{DESCRIPTION}}/"${DESCRIPTION}"/g;s/{{UNITY_VERSION}}/"${UNITY_VERSION}"/g;s/{{COMPANY}}/"${COMPANY}"/g;s/{{COMPANY_FRIENDLY_NAME}}/"${COMPANY_FRIENDLY_NAME}"/g"
18+
replace="s/{{REPOSITORY_NAME}}/"${REPOSITORY_NAME}"/g;s/{{FRIENDLY_NAME}}/"${FRIENDLY_NAME}"/g;s/{{DESCRIPTION}}/"${DESCRIPTION}"/g;s/{{UNITY_VERSION}}/"${UNITY_VERSION}"/g;s/{{COMPANY}}/"${COMPANY}"/g;s/{{COMPANY_FRIENDLY_NAME}}/"${COMPANY_FRIENDLY_NAME}"/g;s/{{YEAR}}/"${YEAR}"/g"
1719

1820
# Replace template strings inside files
1921
sed -i -- $replace "$file"
@@ -29,6 +31,8 @@ echo 'done.'
2931

3032
# Remove template repository specific files
3133
rm README.md
34+
rm LICENSE
3235
mv example-README.md README.md
36+
mv example-LICENSE LICENSE
3337
mv example-.github .github
3438
rm RUNME.sh

example-LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) {{YEAR}} {{COMPANY_FRIENDLY_NAME}}
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

example-README.md

+10
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
## How to use
2121

22+
*Work In Progress*
23+
2224
## Install
2325

2426
### via npm
@@ -76,3 +78,11 @@ Open `Packages/manifest.json` with your favorite text editor. Add following line
7678
```
7779

7880
## Configuration
81+
82+
*Work In Progress*
83+
84+
## License
85+
86+
MIT License
87+
88+
Copyright © {{YEAR}} {{COMPANY_FRIENDLY_NAME}}

0 commit comments

Comments
 (0)