Author: blogic Date: 2016-04-09 12:25:34 +0200 (Sat, 09 Apr 2016) New Revision: 49138
Modified: trunk/include/download.mk trunk/scripts/download.pl Log: download: add @GITHUB download facility Define a new alias (@GITHUB) for downloading raw github repository files Signed-off-by: Alvaro Fernandez Rojas <[email protected]> Modified: trunk/include/download.mk =================================================================== --- trunk/include/download.mk 2016-04-09 10:25:29 UTC (rev 49137) +++ trunk/include/download.mk 2016-04-09 10:25:34 UTC (rev 49138) @@ -13,7 +13,7 @@ define dl_method $(strip \ $(if $(2),$(2), \ - $(if $(filter @APACHE/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),git, \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ Modified: trunk/scripts/download.pl =================================================================== --- trunk/scripts/download.pl 2016-04-09 10:25:29 UTC (rev 49137) +++ trunk/scripts/download.pl 2016-04-09 10:25:34 UTC (rev 49138) @@ -182,6 +182,11 @@ push @mirrors, "http://mirrors.ocf.berkeley.edu/apache/$1"; push @mirrors, "http://mirror.cc.columbia.edu/pub/software/apache/$1"; push @mirrors, "http://ftp.jaist.ac.jp/pub/apache/$1"; + } elsif ($mirror =~ /^\@GITHUB\/(.+)$/) { + # give github a few more tries (different mirrors) + for (1 .. 5) { + push @mirrors, "https://raw.githubusercontent.com/$1"; + } } elsif ($mirror =~ /^\@GNU\/(.+)$/) { push @mirrors, "http://ftpmirror.gnu.org/$1"; push @mirrors, "http://ftp.gnu.org/pub/gnu/$1"; _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
