From ae2a34f44c18dd4abb51ef435b7f9c2867ad5deb Mon Sep 17 00:00:00 2001 From: ludeeus Date: Tue, 30 Jun 2020 20:02:48 +0200 Subject: [PATCH] Adds Makefile --- Makefile | 15 +++++++++++++++ scripts/add | 3 +++ scripts/remove | 13 +++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 Makefile create mode 100644 scripts/add create mode 100644 scripts/remove diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b6c5273 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +.DEFAULT_GOAL := help + +help: ## Shows help message. + @printf "\033[1m%s\033[36m %s\033[32m %s\033[0m \n\n" "Development environment for" "HACS" "Default"; + @awk 'BEGIN {FS = ":.*##";} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m make %-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST); + @echo + +add: ## Add a new repository to the default HACS list + @echo script/add; + +remove: ## Remove a repository to the default HACS list + @bash script/remove; + +update: ## Pull master from hacs/default + @ git pull upstream master; diff --git a/scripts/add b/scripts/add new file mode 100644 index 0000000..27b1a64 --- /dev/null +++ b/scripts/add @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo "Not implemented" \ No newline at end of file diff --git a/scripts/remove b/scripts/remove new file mode 100644 index 0000000..6cbee29 --- /dev/null +++ b/scripts/remove @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +read -p 'Repository: ' repository +read -p 'Reason: ' reason +read -p 'Removal type: ' removal_type +read -p 'Link to more information: ' link + +echo $repository +echo $reason +echo $removal_type +echo $link + +python scripts/remove_repo.py "$repository" "$removal_type" "$reason" "$link" || exit 0 \ No newline at end of file