From 197a63d2f8e509c537284f5519974c252985c556 Mon Sep 17 00:00:00 2001
From: sump pump <Manevolent@users.noreply.github.com>
Date: Sun, 28 Jun 2020 13:58:02 -0600
Subject: [PATCH] Update build.sh

---
 build.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/build.sh b/build.sh
index 2339983..5cec05b 100644
--- a/build.sh
+++ b/build.sh
@@ -39,10 +39,12 @@ do
     echo "Configuring Lixonet3 network $netname from $git..."
     echo "Variables: $sigil_vars"
 
-    # Clone and enter the repository
+    # Clone and copy the repository
     rm -rf "$(basename "$git" .git)"
     git clone $git || { echo "clone $git failed, quitting" ; exit 1; }
-    cd "$(basename "$git" .git)"
+    rm -rf work
+    mkdir work
+    cp -r "$(basename "$git" .git)"/* work/ && cd work
 
     # Copy default files
     cp -r ../tinc/* tinc/