contrib/makerepo.sh: adapt to "fedpkg prep" new behavior
Now "fedpkg prep" command is generating a directory with the "-build" suffix containing the build directory inside. We need to extract it. Real example: If the script is used for a branch related to nm-1-46, the "fedpkg prep" command will generate a NetworkManager-1.46-build/ directory containing the NetworkManager-1.46/ sources directory. We just need to move the NetworkManager-1.46/ out.
This commit is contained in:
@@ -262,6 +262,12 @@ detect_dirname() {
|
||||
# the unpacked tarball (that is, stripping the suffix).
|
||||
for T in $(ls -1 "$BUILD_TYPE"*"$suffix" 2>/dev/null); do
|
||||
D="${T%$suffix}"
|
||||
# At some point FEDPKG changed the behavior of "prep" command
|
||||
# now it generates the directory with "-build" suffix and the
|
||||
# real directory inside. We just move it out.
|
||||
rm -rf $D
|
||||
mv $D-build/$D .
|
||||
rm -rf $D-build
|
||||
[[ -d "$D" ]] && DIRS=("${DIRS[@]}" "$D")
|
||||
done
|
||||
done
|
||||
|
Reference in New Issue
Block a user