diff options
Diffstat (limited to 'scripts/scripts.mk')
-rwxr-xr-x[-rw-r--r--] | scripts/scripts.mk | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/scripts.mk b/scripts/scripts.mk index 77368a7..42aacab 100644..100755 --- a/scripts/scripts.mk +++ b/scripts/scripts.mk @@ -26,9 +26,19 @@ updatetools: $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST) # ---------------------------------------------------------- # How to retrieve the tools -wget_opt=-o /dev/null -ifeq ($(strip $(V)),2) - wget_opt= +ifneq ($(strip $(V)),2) + wget_silent_opt = -o /dev/null + curl_silent_opt = --silent +endif + +ifneq (wget,) +download_cmd = wget --passive-ftp $(wget_silent_opt) -O $@ +else +ifneq (curl,) +download_cmd = curl --ftp-pasv $(curl_silent_opt) -o $@ +else +download_cmd = $(error wget or curl needed for downloads) +endif endif PHONY += scripts @@ -37,13 +47,13 @@ scripts: $(SILENT)mkdir -p $@ $(CONFIG_SUB_DEST): scripts FORCE - @$(CT_ECHO) ' WGET $@' - $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_SUB_SRC) + @$(CT_ECHO) ' DOWNLOAD $@' + $(SILENT)$(download_cmd) $(CONFIG_SUB_SRC) $(SILENT)chmod u+rwx,go+rx-w $@ $(CONFIG_GUESS_DEST): scripts FORCE - @$(CT_ECHO) ' WGET $@' - $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_GUESS_SRC) + @$(CT_ECHO) ' DOWNLOAD $@' + $(SILENT)$(download_cmd) $(CONFIG_GUESS_SRC) $(SILENT)chmod u+rwx,go+rx-w $@ # ---------------------------------------------------------- |