summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/abslibre-tools/librestage6
1 files 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