Commit 501855c9 by Mislav Marohnić

Fix stubbing programs that have dashes in them

parent 24ff49cc
......@@ -3,7 +3,7 @@ set -e
status=0
program="${0##*/}"
PROGRAM="$(echo "$program" | tr a-z A-Z)"
PROGRAM="$(echo "$program" | tr a-z- A-Z_)"
[ -n "$TMPDIR" ] || TMPDIR="/tmp"
_STUB_PLAN="${PROGRAM}_STUB_PLAN"
......
......@@ -15,7 +15,7 @@ teardown() {
stub() {
local program="$1"
local prefix="$(echo "$program" | tr a-z A-Z)"
local prefix="$(echo "$program" | tr a-z- A-Z_)"
shift
export "${prefix}_STUB_PLAN"="${TMP}/${program}-stub-plan"
......@@ -31,7 +31,7 @@ stub() {
unstub() {
local program="$1"
local prefix="$(echo "$program" | tr a-z A-Z)"
local prefix="$(echo "$program" | tr a-z- A-Z_)"
local path="${TMP}/bin/${program}"
export "${prefix}_STUB_END"=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment