mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
CC: download: add @GITHUB download facility
Define a new alias (@GITHUB) for downloading raw github repository files Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49138 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
committed by
Zoltan HERPAI
parent
deb5962250
commit
f2ac199cf5
@@ -13,7 +13,7 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
|
||||
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, \
|
||||
|
||||
@@ -164,6 +164,11 @@ foreach my $mirror (@ARGV) {
|
||||
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";
|
||||
|
||||
Reference in New Issue
Block a user