add throw example

This commit is contained in:
Denis Lehmann 2022-01-20 18:05:03 +01:00
parent a33e147ace
commit ee36b346d3
2 changed files with 64 additions and 0 deletions

19
examples/throw Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# ----------------------
# sf -- script framework
# ----------------------
# Declare sf variables
sfdesc="A script that shows the usage of 'sfdeps'. It should always throw an error."
sfdeps=("source" "nonexistent" "alsononexistent" "echo")
# Include sf, this could be replaced with a long oneliner
source "$(dirname $0)/../sf"
# ----------------------
# Actual script
# ----------------------
echo "If you see this, the commands 'source', 'nonexistent', 'alsononexistent' and 'echo' are available."