diff options
Diffstat (limited to 'download.sh.patch')
-rw-r--r-- | download.sh.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/download.sh.patch b/download.sh.patch new file mode 100644 index 0000000..0eb96fb --- /dev/null +++ b/download.sh.patch @@ -0,0 +1,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 |