summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-06-06 11:31:09 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-09-07 14:34:36 +0200
commitba0adf8f188941ca2a291e961cb59069358005f8 (patch)
tree4d9ebc78de7bee3857d04980bbf9e723fd3ba71d
parent6b5bc28848d56b96d228fb58bd515003c8c61c15 (diff)
Add util for generating a script name for a caller and a command
-rw-r--r--nix-utils.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/nix-utils.sh b/nix-utils.sh
index ba5720d..9d4a3d6 100644
--- a/nix-utils.sh
+++ b/nix-utils.sh
@@ -145,3 +145,9 @@ caller_util_list_subcommands_for() {
done
}
+# Argument 1: Caller script name
+# Argzment 2: Command name
+caller_util_script_for() {
+ echo "$(dirname ${BASH_SOURCE[0]})/${1}-${2}.sh"
+}
+