From 59633ede257e3ebbc81a55e191fee2e83400d477 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Jan 2014 20:58:57 -0500 Subject: librestage: fix staging generated sources --- src/abslibre-tools/librestage | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index aa7f600..96fee8b 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -114,14 +114,16 @@ main() { srcpath='' for path in "./$srcname" "${SRCDEST:-.}/$srcname"; do - if [[ -f "path" ]]; then + if [[ -f "$path" ]]; then srcpath="$path" break fi done if [[ -n "$srcpath" ]]; then msg "Found generated source file: %s" "$srcname" - if cp "$srcpath" "${WORKDIR}/staging/other/${srcurl##"$mirror"}"; then + dest="${WORKDIR}/staging/other/${srcurl##"$mirror"}" + mkdir -p -- "${dest%/*}" + if cp "$srcpath" "$dest"; then msg2 "%s staged on [%s]" "$srcname" other staged=true else -- cgit v1.2.2