From 846509549c2d4be54ebd6f53dbf6dcadf0a789c8 Mon Sep 17 00:00:00 2001 From: 0x5c <0x5c.dev@gmail.com> Date: Mon, 25 Nov 2019 05:43:20 -0500 Subject: [PATCH] Updated Makefile and templates From 0x5c/quick-bot-no-pain --- .gitignore | 8 +++----- Makefile | 16 +++++++++------- templates/{template_keys.py => data/keys.py} | 3 ++- .../{template_options.py => data/options.py} | 3 ++- 4 files changed, 16 insertions(+), 14 deletions(-) rename templates/{template_keys.py => data/keys.py} (83%) rename templates/{template_options.py => data/options.py} (91%) diff --git a/.gitignore b/.gitignore index d91594c..5e27b38 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,11 @@ # Custom -options.py -keys.py - cty.dat cty.json cty.zip -botenv/ -data/ +/botenv/ +/devenv/ +/data/ ######################################################### diff --git a/Makefile b/Makefile index 200bc29..cf468e1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # A quick installation script for painless discord bots. -# v1.1.0 +# v2.0.0 # Copyright (c) 2019 0x5c # Released under the terms of the MIT license. # Part of: @@ -32,7 +32,7 @@ help: # Main install target .PHONY: install -install: $(BOTENV)/req_done options.py keys.py +install: $(BOTENV)/req_done data/options.py data/keys.py # Virual environment setup $(BOTENV)/success: @@ -50,14 +50,16 @@ $(BOTENV)/req_done: requirements.txt $(BOTENV)/success pip install ${PIP_OUTPUT} -U -r requirements.txt @touch $(BOTENV)/req_done +# Creating the ./data subdirectory data: - mkdir data + @echo "\033[34;1m--> Creating ./data ...\033[0m" + @mkdir -p data # Copying templates -options.py keys.py: | data - @echo "\033[34;1m--> Copying template files...\033[0m" - @cp -nv ./templates/template_$@ ./data/$@ - @touch ./data/$@ +data/options.py data/keys.py: ./data + @echo "\033[34;1m--> Copying template for ./$@ ...\033[0m" + @cp -nv ./templates/$@ ./$@ + @touch ./$@ # Deletes the python cache and the virtual environment .PHONY: clean diff --git a/templates/template_keys.py b/templates/data/keys.py similarity index 83% rename from templates/template_keys.py rename to templates/data/keys.py index 7f6279d..da56300 100644 --- a/templates/template_keys.py +++ b/templates/data/keys.py @@ -3,7 +3,8 @@ # ¡ This is a template ! # # # # Make sure to edit it with your preferred settings! # -# And to place it in the root of the bot's folder, # +# And to place it in the /data # +# subdirectory of the bot, # # without the 'template_' part of the name # # # ########################################################## diff --git a/templates/template_options.py b/templates/data/options.py similarity index 91% rename from templates/template_options.py rename to templates/data/options.py index ce21e4c..8c60b01 100644 --- a/templates/template_options.py +++ b/templates/data/options.py @@ -3,7 +3,8 @@ # ¡ This is a template ! # # # # Make sure to edit it with your preferred settings! # -# And to place it in the root of the bot's folder, # +# And to place it in the /data # +# subdirectory of the bot, # # without the 'template_' part of the name # # # ##########################################################