aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/utils/newins
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild/utils/newins')
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newins9
1 files changed, 8 insertions, 1 deletions
diff --git a/paludis/repositories/e/ebuild/utils/newins b/paludis/repositories/e/ebuild/utils/newins
index cfa3b6ce8..6dca5784d 100755
--- a/paludis/repositories/e/ebuild/utils/newins
+++ b/paludis/repositories/e/ebuild/utils/newins
@@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then
fi
rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}"
-cp -P "${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 -P "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}"
+fi
+
doins "${!PALUDIS_TEMP_DIR_VAR}/${2}"