From 315b2cd2afb4cc7c83a54a83a0b1f19164d77b5e Mon Sep 17 00:00:00 2001 From: samedamci Date: Wed, 1 Sep 2021 15:01:54 +0200 Subject: [PATCH] Add example --- example/__init__.py | 3 +++ example/commands/hello-user.sh | 6 ++++++ example/commands/hello.sh | 5 +++++ 3 files changed, 14 insertions(+) create mode 100644 example/__init__.py create mode 100755 example/commands/hello-user.sh create mode 100755 example/commands/hello.sh diff --git a/example/__init__.py b/example/__init__.py new file mode 100644 index 0000000..0328f0c --- /dev/null +++ b/example/__init__.py @@ -0,0 +1,3 @@ +from pysheller import PySheller + +PySheller(name="test-app", description="Very example app.", commands_dir="./commands") diff --git a/example/commands/hello-user.sh b/example/commands/hello-user.sh new file mode 100755 index 0000000..3d829ba --- /dev/null +++ b/example/commands/hello-user.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# help : greet user specified in argument +# arg1 : user - user to greet + +echo "Hello, ${1}!" diff --git a/example/commands/hello.sh b/example/commands/hello.sh new file mode 100755 index 0000000..751a8b9 --- /dev/null +++ b/example/commands/hello.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# help : print "Hello, World!" string + +echo "Hello, World!"