Mercurial > hg > aboriginal
comparison sources/download_functions.sh @ 1622:ca0cf2dc37c2
Add more documentation.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 24 Aug 2013 05:56:17 -0500 |
parents | e8d846fb56eb |
children | 73651ad7ad13 |
comparison
equal
deleted
inserted
replaced
1621:c23377891141 | 1622:ca0cf2dc37c2 |
---|---|
1 #!/bin/echo "This file is sourced, not run" | 1 #!/bin/echo "This file is sourced, not run" |
2 | |
3 # Set of functions to download, extract, and patch source tarballs. | |
4 # | |
5 # Tools to populate and verify a directory of package source tarballs | |
6 # (saved in $SRCDIR which defaults to $TOP/packages). Used by download.sh. | |
7 # | |
8 # You can supply your own tarball in $SRCDIR to avoid downloading it. | |
9 # | |
10 # You can also provide an expanded directory (same filename as $URL | |
11 # but no version or extension) to be used instead of a tarball. This is | |
12 # usually a source control checkout. | |
13 # | |
14 # $IGNORE_REPOS - comma separated list of package names (or "all") to | |
15 # download tarballs for anyway, ignoring the directory version if present. | |
16 # | |
17 # Functions to call from here: | |
18 # | |
19 # download | |
20 # - fetch a file (with wget) if it doesn't already exist, or doesn't match | |
21 # checksum. | |
22 # | |
23 # It expects you to set: | |
24 # $URL - Default location of file, including filename | |
25 # $SHA1 - sha1sum of good file. (Blank means accept any file.) | |
26 # | |
27 # You can also set these (which use filename from $URL): | |
28 # $PREFERRED_MIRROR - Check here first (appending filename from $URL) | |
29 # $MIRROR_LIST - Space separated list of fallback locations (appending | |
30 # filename from $URL) to check if default location didn't have it. | |
31 # | |
32 # Does not re-download existing tarballs if the $SHA1 matches/is blank. | |
33 # Does not download tarball if expanded directory present. | |
34 # | |
35 # cleanup_oldfiles | |
36 # - remove stale files from $SRCDIR | |
37 # | |
38 # Stale means not referenced by a download call since start of script. | |
39 # Only affects files, not subdirectories. | |
40 | |
2 | 41 |
3 # Remove version information and extension tarball name "$1". | 42 # Remove version information and extension tarball name "$1". |
4 # If "$2", add that version number back, keeping original extension. | 43 # If "$2", add that version number back, keeping original extension. |
5 | 44 |
6 noversion() | 45 noversion() |