From 0d41664130a91044c9e614b3ac8462e887e6d29a Mon Sep 17 00:00:00 2001 From: Xavier Petit <32063953+xpetit@users.noreply.github.com> Date: Thu, 12 Sep 2019 13:01:33 +0100 Subject: [PATCH] Overwrite system folder with only one repository --- scripts/install_client.sh | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/scripts/install_client.sh b/scripts/install_client.sh index 7bd0eddb5..6e737cb7e 100755 --- a/scripts/install_client.sh +++ b/scripts/install_client.sh @@ -65,20 +65,15 @@ cd /tmp/system # Overwrite with custom files from Git repository if test -v OVERWRITE; then - IFS=, - for item in $OVERWRITE; do - folder=$(echo "$item" | cut -d';' -f1) - url=$(echo "$item" | cut -d';' -f2) - if git ls-remote -q "$url" &>/dev/null; then - tmp=$(mktemp -d) - git clone --depth 1 "$url" "$tmp" - rm -rf "$tmp"/.git - cp -aT "$tmp" "$folder" - rm -rf "$tmp" - fi - done - IFS=' -' + folder=$(echo "$OVERWRITE" | cut -d';' -f1) + url=$(echo "$OVERWRITE" | cut -d';' -f2) + if git ls-remote -q "$url" &>/dev/null; then + tmp=$(mktemp -d) + git clone --depth 1 "$url" "$tmp" + rm -rf "$tmp"/.git + cp -aT "$tmp" "$folder" + rm -rf "$tmp" + fi fi # Fix permissions