Fix deployment
This commit is contained in:
parent
e799203eb2
commit
0ed5371c2e
1 changed files with 11 additions and 10 deletions
|
@ -43,6 +43,7 @@ do
|
||||||
"--project-name"|"-n")
|
"--project-name"|"-n")
|
||||||
shift
|
shift
|
||||||
PROJECT_NAME="${1}"
|
PROJECT_NAME="${1}"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
"--project-codename"|"-p")
|
"--project-codename"|"-p")
|
||||||
shift
|
shift
|
||||||
|
@ -82,18 +83,18 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
destination_path="${DEPLOYMENT_PATH}/${PROJECT_CODENAME}"
|
destination_path="${DEPLOYMENT_PATH}/${PROJECT_CODENAME}"
|
||||||
mkdir "${destination_path}"
|
mkdir -p "${DEPLOYMENT_PATH}"
|
||||||
script_path=$(dirname "${0}")
|
script_path=$(dirname "${0}")
|
||||||
cp "${script_path}/skeleton" "${destination_path}" -rfp
|
cp "${script_path}/skeleton" "${destination_path}" -rfp
|
||||||
mv "${destination_path}/project_codename.py" "${destination_path}/${PROJECT_CODENAME}.py"
|
mv "${destination_path}/project_codename.py" "${destination_path}/${PROJECT_CODENAME}.py"
|
||||||
while read -r file
|
while read -r file
|
||||||
do
|
do
|
||||||
sed -i "s/__project_codename__/${PROJECT_CODENAME}/g" "${file}"
|
sed -i "s/__project_codename__/${PROJECT_CODENAME}/g" "${file}"
|
||||||
sed -i "s/__author__/${AUTHOR}/g" "${file}"
|
sed -i "s/__author__/${AUTHOR}/g" "${file}"
|
||||||
sed -i "s/__author_email__/${AUTHOR_EMAIL}/g" "${file}"
|
sed -i "s/__author_email__/${AUTHOR_EMAIL}/g" "${file}"
|
||||||
sed -i "s/__authoring_date__/${AUTHORING_DATE}/g" "${file}"
|
sed -i "s/__authoring_date__/${AUTHORING_DATE}/g" "${file}"
|
||||||
sed -i "s/__project_name__/${PROJECT_NAME}/g" "${file}"
|
sed -i "s/__project_name__/${PROJECT_NAME}/g" "${file}"
|
||||||
sed -i "s/__version__/${VERSION}/g" "${file}"
|
sed -i "s/__version__/${VERSION}/g" "${file}"
|
||||||
sed -i "s/__url__/${URL}/g" "${file}"
|
sed -i "s/__url__/${URL}/g" "${file}"
|
||||||
sed -i "s/__license__/${LICENSE}/g" "${file}"
|
sed -i "s/__license__/${LICENSE}/g" "${file}"
|
||||||
done <<< "$(ls "${destination_path}/")"
|
done <<< "$(find "${destination_path}/" -type f)"
|
Loading…
Reference in a new issue