Skip to content

Instantly share code, notes, and snippets.

@4thel00z
Last active November 15, 2020 18:59
Show Gist options
  • Save 4thel00z/2d60087d7ee8bfd3ed7a80a7bade4303 to your computer and use it in GitHub Desktop.
Save 4thel00z/2d60087d7ee8bfd3ed7a80a7bade4303 to your computer and use it in GitHub Desktop.
#
# 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