mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
findTarball: Fix the case where src is a directory
This commit is contained in:
parent
a767210542
commit
0a9ec07b93
1 changed files with 3 additions and 5 deletions
|
@ -1,16 +1,14 @@
|
|||
findTarball() {
|
||||
local suffix i
|
||||
if [ -f "$1" ]; then
|
||||
echo "$1"
|
||||
return
|
||||
fi
|
||||
if [ -d "$1/tarballs/" ]; then
|
||||
for suffix in tar.gz tgz tar.bz2 tbz2 tar.xz tar.lzma; do
|
||||
for i in $1/tarballs/*.$suffix; do echo $i; return; done
|
||||
done | sort | head -1
|
||||
return
|
||||
else
|
||||
echo "$1"
|
||||
return
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
canonicalizeJarManifest() {
|
||||
|
|
Loading…
Reference in a new issue