blob: ad4c0c3c852812d94a96adb13f4d82c51aa55d8b (
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
|
From eb1730afff9377a5f167d0738ad0b3aeba9634d0 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Tue, 19 Mar 2019 18:27:10 -0300
Subject: [PATCH] getnoddosdeviceprofiles: wget timestamping check
Check if the --timestamping option is available to avoid an error in
openwrt when wget is handled by uclient-fetch.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/tools/getnoddosdeviceprofiles b/tools/getnoddosdeviceprofiles
index 337e351..174034f 100755
--- a/tools/getnoddosdeviceprofiles
+++ b/tools/getnoddosdeviceprofiles
@@ -86,7 +86,12 @@ fi
# That's also why we don't delete the downloaded file
if [ "$WGET" != "" ]
then
- GETURL="$WGET --quiet --timestamping"
+ GETURL="$WGET --quiet"
+ # Make sure wget accepts --timestamping
+ if wget --help 2>&1 | egrep timestamping > /dev/null
+ then
+ GETURL="$GETURL --timestamping"
+ fi
else
if [ "$CURL" != "" ]
then
|