Browse Source

Overwrite system folder with only one repository

pull/264/head
Xavier Petit 5 years ago
parent
commit
0d41664130
No known key found for this signature in database
GPG Key ID: CA3F2B17E25ABD26
  1. 23
      scripts/install_client.sh

23
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

Loading…
Cancel
Save