From 59140999cbb93a7c0433254ccb9d3c3470bb20a1 Mon Sep 17 00:00:00 2001 From: Kron4ek Date: Thu, 1 Aug 2024 11:15:57 +0300 Subject: [PATCH] Get utils via git lfs --- create-conty.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/create-conty.sh b/create-conty.sh index 3fd4bd1..157c32b 100755 --- a/create-conty.sh +++ b/create-conty.sh @@ -61,8 +61,22 @@ else fi if [ ! -f "${utils}" ] || [ "$(wc -c < "${utils}")" -lt 100000 ]; then - rm -f "${utils}" - curl -#LO "https://github.com/Kron4ek/Conty/raw/master/${utils}" + if [ -d .git ]; then + git lfs install + git lfs fetch origin master + git lfs checkout + fi + + if [ ! -f "${utils}" ] || [ "$(wc -c < "${utils}")" -lt 100000 ]; then + if git config --get remote.origin.url; then + utils_url="$(git config --get remote.origin.url)"/raw/master/${utils} + else + utils_url="https://github.com/Kron4ek/Conty/raw/master/${utils}" + fi + + rm -f "${utils}" + curl -#LO "${utils_url}" + fi fi if [ ! -f conty-start.sh ]; then