From 511d000a48dc3326a692f4106c84573069c8a695 Mon Sep 17 00:00:00 2001 From: Juan Mesaglio Date: Mon, 23 Dec 2024 12:32:45 -0300 Subject: [PATCH 1/2] feat: validate if so-commons-library and group repo exist locally Signed-off-by: Juan Mesaglio --- deploy.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/deploy.sh b/deploy.sh index 9046604..38062e4 100755 --- a/deploy.sh +++ b/deploy.sh @@ -131,20 +131,13 @@ if [[ $TARGET ]]; then cd "$TARGET" || fail fi -echo -e "\n\n${bold}Checking commons library is installed...${normal}\n\n" +echo -e "\n\n${bold}Installing commons library...${normal}\n\n" -# Refresh dynamic linker cache -sudo ldconfig > /dev/null - -if sudo ldconfig -p | grep "libcommons.so" > /dev/null; then - echo -e "\n\n${bold}Commons library already installed${normal}" -else - echo -e "\n\n${bold}Installing commons library...${normal}\n\n" - - rm -rf "so-commons-library" - git clone "https://github.com/sisoputnfrba/so-commons-library.git" - make -C "so-commons-library" install +# clone only if repo not exist locally +if [ ! -d "so-commons-library" ]; then + git clone --recurse-submodules --shallow-submodules --depth 1 --branch master "https://github.com/sisoputnfrba/so-commons-library.git" fi +make -C "so-commons-library" uninstall install echo -e "\n\n${bold}Cloning external libraries...${normal}" @@ -159,8 +152,9 @@ done echo -e "\n\n${bold}Cloning project repo...${normal}\n\n" -rm -rf "$REPONAME" -git clone "https://github.com/sisoputnfrba/${REPONAME}.git" +if [ ! -d "${REPONAME}" ]; then + git clone "https://github.com/sisoputnfrba/${REPONAME}.git" +fi echo -e "\n\n${bold}Building dependencies${normal}..." From eca72252ba4a4920b5db490ce980d0474ae22b07 Mon Sep 17 00:00:00 2001 From: Juan Mesaglio Date: Mon, 23 Dec 2024 12:33:19 -0300 Subject: [PATCH 2/2] chore: update .gitignore Signed-off-by: Juan Mesaglio --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file