aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-23 12:04:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-23 12:04:51 -0300
commit78739a6fca4235d4e0637d4f914ca96692a9f713 (patch)
treec04efb3adca86eed4b51ce2b1fea56b92047a17f
downloadborger-78739a6fca4235d4e0637d4f914ca96692a9f713.tar.gz
borger-78739a6fca4235d4e0637d4f914ca96692a9f713.tar.bz2
Initial import
-rw-r--r--.gitignore0
-rw-r--r--ChangeLog0
-rw-r--r--Makefile47
-rw-r--r--README.md2
-rw-r--r--TODO.md2
5 files changed, 51 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.gitignore
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ChangeLog
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6dbbd98
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+#
+# Global Makefile - https://templater.fluxo.info
+#
+# This Makefile contains basic, common targets and also includes
+# any Makefile.* available in the current folder.
+#
+
+# Port to serve content
+HTTP_PORT="8000"
+HTTP_SERVER="SimpleHTTPServer"
+
+# Set CONTAINER based in what we have available in the system
+# This variable can be user in other, included Makefiles to handle virtualization tasks
+ifeq ($(shell which kvmx > /dev/null && test -s kvmxfile && echo yes), yes)
+ CONTAINER = kvmx
+else ifeq ($(shell which vagrant > /dev/null && test -s Vagrantfile && echo yes), yes)
+ CONTAINER = vagrant
+else ifeq ($(shell which docker > /dev/null && test -s Dockerfile && echo yes), yes)
+ CONTAINER = docker
+else
+ CONTAINER = ''
+endif
+
+# See http://unix.stackexchange.com/questions/32182/simple-command-line-http-server#32200
+# http://php.net/manual/en/features.commandline.webserver.php
+serve:
+ @if [ "$(HTTP_SERVER)" = "SimpleHTTPServer" ]; then python -m SimpleHTTPServer $(HTTP_PORT); fi
+ @if [ "$(HTTP_SERVER)" = "ssi_server" ]; then PYTHONDONTWRITEBYTECODE=0 ssi_server.py $(HTTP_PORT); fi
+ @if [ "$(HTTP_SERVER)" = "http.server" ]; then python3 -m http.server $(HTTP_PORT); fi
+ @if [ "$(HTTP_SERVER)" = "php" ]; then php -S localhost:$(HTTP_PORT); fi
+
+# Configure a git post-receive hook
+post_receive:
+ git config receive.denyCurrentBranch ignore
+ test -s bin/post-receive && cd .git/hooks && ln -sf ../../bin/post-receive
+
+# Process any other Makefile whose filename matches Makefile.*
+# See https://www.gnu.org/software/make/manual/html_node/Include.html
+#
+# Some of those files might even contain local customizations/overrides
+# that can be .gitignore'd, like a Makefile.local for example.
+-include Makefile.*
+
+# Customization examples can be as simple as setting variables:
+#CONTAINER = vagrant
+#CONTAINER = docker
+#DESTDIR ?= vendor
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..22d1f89
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+borger
+======
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000..74e5cc0
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,2 @@
+TODO
+====