mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nuget-package-hook: use sub-shell to set nullglob
This commit is contained in:
parent
bfa7bef5ec
commit
6097d6e202
@ -41,27 +41,29 @@ fi
|
||||
_createNugetSourceInOutput() {
|
||||
local package version id dir nupkg content
|
||||
local -a nuspec
|
||||
shopt -s nullglob
|
||||
(
|
||||
shopt -s nullglob
|
||||
|
||||
for package in "$prefix"/share/nuget/packages/*/*; do
|
||||
version=$(basename "$package")
|
||||
id=$(basename "$(dirname "$package")")
|
||||
dir="$prefix/share/nuget/source/$id/$version"
|
||||
nupkg=$dir/$id.$version.nupkg
|
||||
nuspec=("$package"/*.nuspec)
|
||||
for package in "$prefix"/share/nuget/packages/*/*; do
|
||||
version=$(basename "$package")
|
||||
id=$(basename "$(dirname "$package")")
|
||||
dir="$prefix/share/nuget/source/$id/$version"
|
||||
nupkg=$dir/$id.$version.nupkg
|
||||
nuspec=("$package"/*.nuspec)
|
||||
|
||||
if [[ -n ${createInstallableNugetSource-} ]]; then
|
||||
content=.
|
||||
else
|
||||
content=$(basename "${nuspec[0]}")
|
||||
fi
|
||||
if [[ -n ${createInstallableNugetSource-} ]]; then
|
||||
content=.
|
||||
else
|
||||
content=$(basename "${nuspec[0]}")
|
||||
fi
|
||||
|
||||
mkdir -p "$dir"
|
||||
cp "${nuspec[0]}" "$dir/$id.nuspec"
|
||||
(cd "$package" && @zip@/bin/zip -rq0 "$nupkg" "$content")
|
||||
@stripNondeterminism@/bin/strip-nondeterminism --type zip "$nupkg"
|
||||
touch "$nupkg".sha512
|
||||
done
|
||||
mkdir -p "$dir"
|
||||
cp "${nuspec[0]}" "$dir/$id.nuspec"
|
||||
(cd "$package" && @zip@/bin/zip -rq0 "$nupkg" "$content")
|
||||
@stripNondeterminism@/bin/strip-nondeterminism --type zip "$nupkg"
|
||||
touch "$nupkg".sha512
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
createNugetSource() {
|
||||
|
Loading…
Reference in New Issue
Block a user