-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# vim: foldmarker={{{,}}}:foldmethod=marker | ||
|
||
# SPDX-FileCopyrightText: 2021 Robin Schneider <ypid@riseup.net> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
SHELL ?= /bin/bash -o nounset -o pipefail -o errexit | ||
MAKEFLAGS += --no-builtin-rules | ||
.SUFFIXES: | ||
|
||
#-# Help {{{ | ||
#-# https://stackoverflow.com/a/26339924/2239985 | ||
.PHONY: list | ||
list: | ||
@if command -v mmake >/dev/null 2>&1; then \ | ||
mmake help; \ | ||
else \ | ||
echo "This Makefile has the following targets:"; \ | ||
$(MAKE) -pRrq -f $(firstword $(MAKEFILE_LIST)) / 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | sed 's/^/ /' | sort; \ | ||
fi | ||
#-# }}} | ||
|
||
test: | ||
@echo "Do something." 1>&2 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
# | ||
# SPDX-FileCopyrightText: 2021 Robin Schneider <ypid@riseup.net> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
""" | ||
TODO: Use the docstring to give a short description of what the script does. | ||
This is automatically included in the help text. Remove the following reference | ||
to the template itself from the docstring. | ||
""" | ||
|
||
import argparse | ||
|
||
__version__ = '0.1.0' | ||
|
||
|
||
def main(): | ||
args_parser = argparse.ArgumentParser(description=__doc__) | ||
args_parser.add_argument('-H', '--host', required=True) | ||
args_parser.add_argument( | ||
'-V', '--version', action='version', | ||
version='%(prog)s {}'.format(__version__)) | ||
cli_args = args_parser.parse_args() | ||
|
||
print(cli_args.host) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |