aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/utils/newexe
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild/utils/newexe')
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newexe9
1 files changed, 8 insertions, 1 deletions
diff --git a/paludis/repositories/e/ebuild/utils/newexe b/paludis/repositories/e/ebuild/utils/newexe
index 236b48d87..40873858d 100755
--- a/paludis/repositories/e/ebuild/utils/newexe
+++ b/paludis/repositories/e/ebuild/utils/newexe
@@ -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
+
doexe "${!PALUDIS_TEMP_DIR_VAR}/${2}"