summaryrefslogtreecommitdiff
path: root/src/abslibre-tools
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-05 20:58:57 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-05 20:58:57 -0500
commit59633ede257e3ebbc81a55e191fee2e83400d477 (patch)
treebd473a92718490773cb3bdfb1fd860f43de17aab /src/abslibre-tools
parent0ab5354f379e27ad863903953044a41382ad50a6 (diff)
librestage: fix staging generated sources
Diffstat (limited to 'src/abslibre-tools')
-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