Last active
November 15, 2020 18:59
-
-
Save 4thel00z/2d60087d7ee8bfd3ed7a80a7bade4303 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Licensed under the GPL-3 License | |
# | |
# Author: Mohamed Mustapha Tahrioui aka. ransomware aka. 4thel00z ([email protected]) | |
# | |
# The intention of this software is to provide a simple go http service boilerplate for myself | |
# and others who are interested in using my software non-commercially or commercialy. | |
# | |
# | |
#! /bin/bash | |
set -x | |
project_name=$1 | |
git clone [email protected]:4thel00z/service_templated.git $project_name | |
rm -rf $project_name/.git | |
rm -rf $project_name/pkg/libservice_template/modules/examples | |
find $project_name -type f | xargs sed -i "s/service_template/$project_name/g" | |
find $project_name -type d -name "*service_template*"| | |
while IFS= read -r DIR | |
do | |
mv "${DIR}" $(echo "${DIR}" | sed -E "s/service_template/$project_name/") | |
done | |
cd $project_name | |
curl http://artii.herokuapp.com/make\?text\="$project_name"d\&font\=graffiti > assets/banner.txt | |
echo "" >> assets/banner.txt | |
sed -e '/SERVICE_TEMPLATE_BANNER/ {' -e 'r assets/banner.txt' -e 'd' -e '}' -i cmd/"$project_name"d/main.go | |
git init | |
git add . | |
git commit -m "[master] Initial commit" | |
touch .env | |
echo "{}" > ."$project_name"drc.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment