aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/utils/newdoc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild/utils/newdoc')
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newdoc9
1 files changed, 8 insertions, 1 deletions
diff --git a/paludis/repositories/e/ebuild/utils/newdoc b/paludis/repositories/e/ebuild/utils/newdoc
index 70c7ee82c..d0eb53f8a 100755
--- a/paludis/repositories/e/ebuild/utils/newdoc
+++ b/paludis/repositories/e/ebuild/utils/newdoc
@@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then
fi
rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}"
-cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}"
+
+if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then
+ [[ -t 0 ]] && paludis_die_or_error "requires stdin input"
+ cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}"
+else
+ cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}"
+fi
+
dodoc "${!PALUDIS_TEMP_DIR_VAR}/${2}"