mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
b98a144355
svn path=/nixpkgs/trunk/; revision=11947
20 lines
234 B
Bash
Executable file
20 lines
234 B
Bash
Executable file
#! /bin/sh
|
|
|
|
source lib-cache.sh
|
|
|
|
get_file() {
|
|
url="$1";
|
|
|
|
if [ -n "$url" ]; then
|
|
curl "$1";
|
|
else
|
|
echo -n;
|
|
fi;
|
|
}
|
|
|
|
url="$1";
|
|
name="$2";
|
|
name=${name:-$(basename "$url")}
|
|
|
|
cached_output get_file "${name%%.*}" "$url" "${name#*.}"
|
|
|