From 1135be275d1c0aa22134b082e222c8d0bf5f1f5f Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Tue, 5 Nov 2019 15:39:00 +0800 Subject: [PATCH] build_oran.sh: avoid using -C option for git git version 1.x desn't support -C option, so avoid using this option to ensure the script can be run with git 1.x Signed-off-by: Jackie Huang Change-Id: I2528418e5adbf6c4e7542106172a6f3b7a3ba8f4 --- scripts/build_oran.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build_oran.sh b/scripts/build_oran.sh index 39600c3..1284752 100755 --- a/scripts/build_oran.sh +++ b/scripts/build_oran.sh @@ -83,14 +83,15 @@ echo_cmd "Setup wrlinux build project:" ${RUN_CMD} # Clone the oran layer if it's not already cloned -cd ${SRC_ORAN_DIR} # Check if the script is inside the repo -if git -C ${SCRIPTS_DIR} rev-parse --is-inside-work-tree > /dev/null 2>&1; then +if cd ${SCRIPTS_DIR} && git rev-parse --is-inside-work-tree > /dev/null 2>&1; then CLONED_ORAN_REPO=`dirname ${SCRIPTS_DIR}` echo_info "Use the cloned oran repo: ${CLONED_ORAN_REPO}" + cd ${SRC_ORAN_DIR} ln -sf ${CLONED_ORAN_REPO} else echo_info "Cloning oran layer:" + cd ${SRC_ORAN_DIR} RUN_CMD="git clone https://gerrit.o-ran-sc.org/r/pti/rtp" echo_cmd "Cloing with:" ${RUN_CMD} -- 2.16.6