diff options
author | P. J. McDermott <pjm@nac.net> | 2013-04-28 10:14:09 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-04-28 10:14:09 (EDT) |
commit | e214ce9fa75a77436bbca77ffc9b78de31962277 (patch) | |
tree | bd6e2bbfe17e1b7af1144c4e878e0567e1658e65 | |
parent | e1ba5dc4767ad9e6d245d61a981c34221d40ae58 (diff) |
oh-installfiles: In mkdir cmd, rm / and 1+ chars.
Previously, a pattern like `/usr/include/` in <binpkg>.pkg/files would cause
oh-installfiles to run `mkdir -p <binpkg>.data//usr/include` and install headers
in `<binpkg>.data/usr/include/include/`.
Before:
$ pkg=foo
$ file=/usr/include
$ echo mkdir -p "${pkg}.data/${file%/*}"
mkdir -p foo.data//usr
$ file=/usr/include/
$ echo mkdir -p "${pkg}.data/${file%/*}"
mkdir -p foo.data//usr/include
After:
$ pkg=foo
$ file=/usr/include
$ echo mkdir -p "${pkg}.data/${file%/?*}"
mkdir -p foo.data//usr
$ file=/usr/include/
$ echo mkdir -p "${pkg}.data/${file%/?*}"
mkdir -p foo.data//usr
-rw-r--r-- | src/oh-installfiles.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/oh-installfiles.sh b/src/oh-installfiles.sh index 8538d8f..c9abd36 100644 --- a/src/oh-installfiles.sh +++ b/src/oh-installfiles.sh @@ -54,7 +54,7 @@ main() for file in "${dir}/"${pattern}; do [ -e "${file}" -o -L "${file}" ] || continue file="${file#${dir}}" - mkdir -p "${pkg}.data/${file%/*}" + mkdir -p "${pkg}.data/${file%/?*}" # TODO: If file, ln file. If dir, recursively mkdir and ln. mv "${PWD}/${dir}/${file}" "${pkg}.data/${file}" done |