Lines 1-30
Link Here
|
1 |
--- update-smart-drivedb.in.orig 2014-12-06 20:12:50 UTC |
1 |
--- update-smart-drivedb.in.orig 2016-02-26 23:29:24.000000000 +0300 |
2 |
+++ update-smart-drivedb.in |
2 |
+++ update-smart-drivedb.in 2016-05-12 23:07:17.558810000 +0300 |
3 |
@@ -69,26 +69,8 @@ EOF |
3 |
@@ -51,7 +51,8 @@ |
4 |
*) DEST="$1" ;; |
4 |
-s SMARTCTL Use SMARTCTL for syntax check ('-s -' to disable) |
|
|
5 |
[default: $SMARTCTL] |
6 |
-t TOOL Use TOOL for download: $os_dltools |
7 |
- [default: first one found in PATH] |
8 |
+ [default: fetch, which is always available |
9 |
+ on FreeBSD.] |
10 |
-u LOCATION Use URL of LOCATION for download: |
11 |
sf (Sourceforge code browser via HTTPS) |
12 |
svn (SVN repository via HTTPS) [default] |
13 |
@@ -262,14 +263,8 @@ |
5 |
esac |
14 |
esac |
6 |
|
15 |
|
7 |
-# Abort if 'which' is not available |
16 |
if [ -z "$tool" ]; then |
8 |
-which which >/dev/null || exit 1 |
17 |
- # Find download tool in PATH |
9 |
- |
18 |
- for t in $os_dltools; do |
10 |
# Find download tool |
19 |
- if inpath "$t"; then |
11 |
-DOWNLOAD= |
20 |
- tool=$t |
12 |
-for t in $os_dltools; do |
21 |
- break |
13 |
- if which $t >/dev/null 2>/dev/null; then |
22 |
- fi |
14 |
- case $t in |
23 |
- done |
15 |
- curl) DOWNLOAD="curl ${q:+-s }"'-f -o "$DEST.new" "$SRC"' ;; |
24 |
- test -n "$tool" || error "found none of: $os_dltools" |
16 |
- lynx) DOWNLOAD='lynx -source "$SRC" >"$DEST.new"' ;; |
25 |
+ # Set to fetch by default |
17 |
- wget) DOWNLOAD="wget $q"'-O "$DEST.new" "$SRC"' ;; |
26 |
+ tool="fetch" |
18 |
- fetch) DOWNLOAD='fetch -o "$DEST.new" "$SRC"' ;; # FreeBSD |
27 |
fi |
19 |
- ftp) DOWNLOAD='ftp -o "$DEST.new" "$SRC"' ;; # OpenBSD |
|
|
20 |
- esac |
21 |
- break |
22 |
- fi |
23 |
-done |
24 |
-if [ -z "$DOWNLOAD" ]; then |
25 |
- echo "$0: found none of: $os_dltools" >&2; exit 1 |
26 |
-fi |
27 |
+DOWNLOAD='fetch -o "$DEST.new" "$SRC"' |
28 |
|
28 |
|
29 |
# Try possible branch first, then trunk |
29 |
test -n "$url" || selecturl "svn" |
30 |
for location in "branches/$BRANCH" "trunk"; do |
|
|