repo.or.cz
/
NixPkgs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git]
/
pkgs
/
development
/
perl-modules
/
expression-generator
/
grab-url.sh
blob
8935cad8cefe3dbdd3c441e1c88ddc36126edf13
1
#! /bin/sh
2
3
source
lib-cache.sh
4
5
get_file
() {
6
url
=
"
$1
"
;
7
8
if
[
-n
"
$url
"
];
then
9
curl
"
$1
"
;
10
else
11
echo -n
;
12
fi
;
13
}
14
15
url
=
"
$1
"
;
16
name
=
"
$2
"
;
17
name
=
${name:-$(basename "$url")}
18
19
cached_output get_file
"
${name%%.*}
"
"
$url
"
"
${name#*.}
"