Skip to content
Snippets Groups Projects
Commit 8ce473eb authored by Alice Brenon's avatar Alice Brenon
Browse files

Expose program name to bash scripts

parent 635d4306
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ source ${0%/*}/../lib.sh ...@@ -4,7 +4,7 @@ source ${0%/*}/../lib.sh
if [ "$#" != 2 ] if [ "$#" != 2 ]
then then
die "${0##*/} SOURCE_DIRECTORY TARGET_DIRECTORY" die "${PROG_NAME} SOURCE_DIRECTORY TARGET_DIRECTORY"
else else
SOURCE="${1}" SOURCE="${1}"
TARGET="${2}" TARGET="${2}"
......
...@@ -6,7 +6,7 @@ source ${BASE_DIR}/lib.sh ...@@ -6,7 +6,7 @@ source ${BASE_DIR}/lib.sh
if [ "$#" != 2 ] if [ "$#" != 2 ]
then then
die "${0##*/} SOURCE_DIRECTORY TARGET_DIRECTORY" die "${PROG_NAME} SOURCE_DIRECTORY TARGET_DIRECTORY"
else else
SOURCE="${1}" SOURCE="${1}"
TARGET="${2}" TARGET="${2}"
......
...@@ -2,3 +2,5 @@ function die() { ...@@ -2,3 +2,5 @@ function die() {
printf "${1}\n" printf "${1}\n"
exit 1 exit 1
} }
PROG_NAME="${0##*/}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment