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