commit
5a9574a72c
|
@ -1,7 +1,7 @@
|
||||||
# <PROJECT_NAME>
|
# <PROJECT_NAME>
|
||||||
|
|
||||||
[![Join the chat at https://gitter.im/ethereum/<REPO_NAME>](https://badges.gitter.im/ethereum/<REPO_NAME>.svg)](https://gitter.im/ethereum/<REPO_NAME>?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[![Join the chat at https://gitter.im/ethereum/<REPO_NAME>](https://badges.gitter.im/ethereum/<REPO_NAME>.svg)](https://gitter.im/ethereum/<REPO_NAME>?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[![Build Status](https://travis-ci.org/ethereum/<REPO_NAME>.png)](https://travis-ci.org/ethereum/<REPO_NAME>)
|
[![Build Status](https://circleci.com/gh/ethereum/<REPO_NAME>.svg?style=shield)](https://circleci.com/gh/ethereum/<REPO_NAME>)
|
||||||
[![PyPI version](https://badge.fury.io/py/<PYPI_NAME>.svg)](https://badge.fury.io/py/<PYPI_NAME>)
|
[![PyPI version](https://badge.fury.io/py/<PYPI_NAME>.svg)](https://badge.fury.io/py/<PYPI_NAME>)
|
||||||
[![Python versions](https://img.shields.io/pypi/pyversions/<PYPI_NAME>.svg)](https://pypi.python.org/pypi/<PYPI_NAME>)
|
[![Python versions](https://img.shields.io/pypi/pyversions/<PYPI_NAME>.svg)](https://pypi.python.org/pypi/<PYPI_NAME>)
|
||||||
[![Docs build](https://readthedocs.org/projects/<RTD_NAME>/badge/?version=latest)](http://<RTD_NAME>.readthedocs.io/en/latest/?badge=latest)
|
[![Docs build](https://readthedocs.org/projects/<RTD_NAME>/badge/?version=latest)](http://<RTD_NAME>.readthedocs.io/en/latest/?badge=latest)
|
||||||
|
|
|
@ -4,9 +4,6 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# List of all non-executable files
|
|
||||||
TEMPLATE_FILES=$(find . ! -perm -u=x -type f | grep -v "\.git")
|
|
||||||
|
|
||||||
echo "What is your python module name?"
|
echo "What is your python module name?"
|
||||||
read MODULE_NAME
|
read MODULE_NAME
|
||||||
|
|
||||||
|
@ -29,12 +26,20 @@ PROJECT_NAME=${PROJECT_INPUT:-$REPO_NAME}
|
||||||
echo "What is a one-liner describing the project?"
|
echo "What is a one-liner describing the project?"
|
||||||
read SHORT_DESCRIPTION
|
read SHORT_DESCRIPTION
|
||||||
|
|
||||||
sed -i "s/<MODULE_NAME>/$MODULE_NAME/g" $TEMPLATE_FILES
|
_replace() {
|
||||||
sed -i "s/<PYPI_NAME>/$PYPI_NAME/g" $TEMPLATE_FILES
|
local find_cmd=(find . ! -perm -u=x ! -path '*/.git/*' -type f)
|
||||||
sed -i "s/<REPO_NAME>/$REPO_NAME/g" $TEMPLATE_FILES
|
|
||||||
sed -i "s/<RTD_NAME>/$RTD_NAME/g" $TEMPLATE_FILES
|
if [[ $(uname) == Darwin ]]; then
|
||||||
sed -i "s/<PROJECT_NAME>/$PROJECT_NAME/g" $TEMPLATE_FILES
|
"${find_cmd[@]}" -exec sed -i '' "$1" {} +
|
||||||
sed -i "s/<SHORT_DESCRIPTION>/$SHORT_DESCRIPTION/g" $TEMPLATE_FILES
|
else
|
||||||
|
"${find_cmd[@]}" -exec sed -i "$1" {} +
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
_replace "s/<PYPI_NAME>/$PYPI_NAME/g"
|
||||||
|
_replace "s/<REPO_NAME>/$REPO_NAME/g"
|
||||||
|
_replace "s/<RTD_NAME>/$RTD_NAME/g"
|
||||||
|
_replace "s/<PROJECT_NAME>/$PROJECT_NAME/g"
|
||||||
|
_replace "s/<SHORT_DESCRIPTION>/$SHORT_DESCRIPTION/g"
|
||||||
|
|
||||||
mkdir $MODULE_NAME
|
mkdir $MODULE_NAME
|
||||||
touch $MODULE_NAME/__init__.py
|
touch $MODULE_NAME/__init__.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user