hooks/do-extract: fix for extract distfiles to single file
We missed the case that distfiles was extracted to a single file. Instead of changing the second leg, we can simply remove the third leg because renaming the empty $extractdir to $wrksrc is the same of create new empty $wrksrc
This commit is contained in:
parent
092023e548
commit
e64f6c2c46
|
@ -205,11 +205,8 @@ hook() {
|
|||
# rename the subdirectory (top-level of distfiles) to $wrksrc
|
||||
mv "$innerdir" "$wrksrc" &&
|
||||
rmdir "$extractdir"
|
||||
elif [ "$num_dirs" -gt 1 ] || [ -n "$create_wrksrc" ]; then
|
||||
# rename the tmpdir to wrksrc
|
||||
mv "$extractdir" "$wrksrc"
|
||||
else
|
||||
mkdir -p "$wrksrc"
|
||||
mv "$extractdir" "$wrksrc"
|
||||
fi ||
|
||||
msg_error "$pkgver: failed to move sources to $wrksrc\n"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue