add throw example
This commit is contained in:
parent
a33e147ace
commit
ee36b346d3
2 changed files with 64 additions and 0 deletions
19
examples/throw
Executable file
19
examples/throw
Executable 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."
|
||||
Loading…
Add table
Add a link
Reference in a new issue