From a937d59da4770f1def2bd9dda6a3d5bb7296249b Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Wed, 15 Jun 2016 14:12:18 -0400 Subject: [PATCH 1/3] Migrated `os::cmd' utilities into `hack/lib' Signed-off-by: Steve Kuznetsov --- hack/{cmd_util.sh => lib/cmd.sh} | 0 hack/lib/init.sh | 1 - 2 files changed, 1 deletion(-) rename hack/{cmd_util.sh => lib/cmd.sh} (100%) diff --git a/hack/cmd_util.sh b/hack/lib/cmd.sh similarity index 100% rename from hack/cmd_util.sh rename to hack/lib/cmd.sh diff --git a/hack/lib/init.sh b/hack/lib/init.sh index bd1b26d7842f..163fe9cada63 100644 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -12,7 +12,6 @@ fi library_files=( $( find "${OS_ROOT}/hack/lib" -type f -name '*.sh' -not -path '*/hack/lib/init.sh' ) ) # TODO(skuzmets): Move the contents of the following files into respective library files. -library_files+=( "${OS_ROOT}/hack/cmd_util.sh" ) library_files+=( "${OS_ROOT}/hack/common.sh" ) library_files+=( "${OS_ROOT}/hack/text.sh" ) library_files+=( "${OS_ROOT}/hack/util.sh" ) From c888003be796ac7402bcf8a440d77dded8935fa8 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Wed, 15 Jun 2016 14:13:06 -0400 Subject: [PATCH 2/3] Migrated `os::text' utilities into `hack/lib/util' Signed-off-by: Steve Kuznetsov --- hack/lib/init.sh | 1 - hack/{ => lib/util}/text.sh | 0 2 files changed, 1 deletion(-) rename hack/{ => lib/util}/text.sh (100%) diff --git a/hack/lib/init.sh b/hack/lib/init.sh index 163fe9cada63..d6adea5cfc80 100644 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -13,7 +13,6 @@ fi library_files=( $( find "${OS_ROOT}/hack/lib" -type f -name '*.sh' -not -path '*/hack/lib/init.sh' ) ) # TODO(skuzmets): Move the contents of the following files into respective library files. library_files+=( "${OS_ROOT}/hack/common.sh" ) -library_files+=( "${OS_ROOT}/hack/text.sh" ) library_files+=( "${OS_ROOT}/hack/util.sh" ) for library_file in "${library_files[@]}"; do diff --git a/hack/text.sh b/hack/lib/util/text.sh similarity index 100% rename from hack/text.sh rename to hack/lib/util/text.sh From ae5817bb672fcbe1f9298c8dac3b3edd5430e385 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Wed, 15 Jun 2016 14:15:38 -0400 Subject: [PATCH 3/3] Updated `os::cmd' internals to reflect new script location Signed-off-by: Steve Kuznetsov --- hack/lib/cmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lib/cmd.sh b/hack/lib/cmd.sh index 4ad9a70c4051..9008cb4a8484 100644 --- a/hack/lib/cmd.sh +++ b/hack/lib/cmd.sh @@ -274,7 +274,7 @@ function os::cmd::internal::determine_caller() { local call_depth= local len_sources="${#BASH_SOURCE[@]}" for (( i=0; i<${len_sources}; i++ )); do - if [ ! $(echo "${BASH_SOURCE[i]}" | grep "hack/cmd_util\.sh$") ]; then + if [ ! $(echo "${BASH_SOURCE[i]}" | grep "hack/lib/cmd\.sh$") ]; then call_depth=i break fi