aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2006-09-04 14:58:33 +0000
committerAvatar Mike Kelly <pioto@pioto.org> 2006-09-04 14:58:33 +0000
commit31e4d933bcd46d98863ceaeb8f64485aeb018fb9 (patch)
treeb115a8bcaeafaeee52391386f426219d69991ed9
parent24a6abb15cb179cbc5db367cf1ef0087d96dc114 (diff)
downloadpaludis-31e4d933bcd46d98863ceaeb8f64485aeb018fb9.tar.gz
paludis-31e4d933bcd46d98863ceaeb8f64485aeb018fb9.tar.xz
Should now work properly in recursive mode. Added support for the -f option (allowed files). Fixed a potential bug with allowed extension matching. Fixes berlios#8655.
-rw-r--r--ebuild/utils/dohtml17
1 files changed, 12 insertions, 5 deletions
diff --git a/ebuild/utils/dohtml b/ebuild/utils/dohtml
index 66d1610..09743c9 100644
--- a/ebuild/utils/dohtml
+++ b/ebuild/utils/dohtml
@@ -30,6 +30,7 @@ fi
allowed_exts="png gif html htm jpg css jps"
disallowed_dirs=""
+allowed_files=""
recurse=0
args=( )
@@ -58,6 +59,10 @@ parse_args() {
allowed_exts="$(split_names $2)"
shift
;;
+ -f)
+ allowed_files="$(split_names $2)"
+ shift
+ ;;
-x)
disallowed_dirs="$(split_names $2)"
shift
@@ -70,9 +75,9 @@ parse_args() {
}
install_file() {
- bn=${1}
- dn=${2}
- prefix=${3}
+ local bn=${1}
+ local dn=${2}
+ local prefix=${3}
local ret=0
path=${bn}
@@ -84,8 +89,10 @@ install_file() {
dir="${D}usr/share/doc/${PF}/${DOCDESTTREE}/${prefix}"
if [[ -f ${path} ]]; then
- ext="${path##*.}"
- if [[ -n ${ext} ]] && has $ext $allowed_exts; then
+ ext="$(basename ${path})"
+ ext="${ext##*.}"
+ if ([[ -n ${ext} ]] && has $ext $allowed_exts) || has $bn $allowed_files
+ then
[[ ! -d ${dir} ]] && install -d "${dir}"
echo "install -m0644 ${path} ${dir}"
install -m0644 "${path}" "${dir}/${bn}"