2014-11-05 18:21:44 +01:00
|
|
|
findTarball() {
|
2014-11-05 18:06:14 +01:00
|
|
|
local suffix i
|
2014-11-05 18:21:44 +01:00
|
|
|
if [ -d "$1/tarballs/" ]; then
|
2018-07-30 16:44:35 +02:00
|
|
|
for suffix in tar.gz tgz tar.bz2 tbz2 tbz tar.xz txz tar.lzma; do
|
2014-11-20 13:19:36 +01:00
|
|
|
for i in $1/tarballs/*.$suffix; do echo $i; break; done
|
2014-11-05 18:21:44 +01:00
|
|
|
done | sort | head -1
|
|
|
|
return
|
2014-11-10 20:06:14 +01:00
|
|
|
else
|
|
|
|
echo "$1"
|
|
|
|
return
|
2014-11-05 18:21:44 +01:00
|
|
|
fi
|
2012-07-13 20:58:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
propagateImageName() {
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out/nix-support
|
2012-07-13 20:58:39 +02:00
|
|
|
cat "$diskImage"/nix-support/full-name > $out/nix-support/full-name
|
|
|
|
}
|