summaryrefslogtreecommitdiff
path: root/download.sh.patch
blob: 0eb96fb12c20e95c496c8c89fe8043a3e780c678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff --git a/scripts/download.sh b/scripts/download.sh2.sh
index eb9ce59..7c9eaf4 100755
--- a/scripts/download.sh
+++ b/scripts/download.sh
@@ -40,6 +40,8 @@ function git_retry() {
 
 set -e
 
+echo download.sh $@
+
 if [ "${1: -3}" == ".gz" ] ; then
 
     # Neither curl or wget are guaranteed to be included in all *nix systems,
@@ -79,25 +81,11 @@ if [ "${1: -3}" == ".gz" ] ; then
 
 else
 
-    if type "git" > /dev/null; then
-        echo "Cloning $1 to $2"
-        if [ $# -gt 2 ]; then
-            if [ "$3" == "unknown" ]; then
-                git_retry clone --depth 1 $1 $2
-            else
-                # Not gonna retry on the first `git clone`- the backup command
-                # exists anyway
-                { git clone --branch $3 --single-branch $1 $2; } ||
-                { git_retry clone $1 $2 && git -C $2 checkout $3; }
-            fi
-        else
-            git_retry clone --depth 1 $1 $2
-        fi
-
-    else
-        echo "ERROR: \"git\" is required to automatically install tools."
-        exit 1
-    fi
+    echo "Copying $1 to $2"
+		reference=$(echo $1 | sed -e 's/https:\/\/github.com\//git_/' | sed -e 's/\//_/' | sed -e 's/-/_/g')
+		mkdir -p $(dirname $2)
+		cp -r ${!reference} $2
+		chmod -R 755 $2
 fi
 
 exit 0