aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/utils/newexe
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2012-09-09 16:17:14 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2012-09-09 16:17:14 +0100
commit2f0c98385684988519b9fb163448f5816c7fc3d2 (patch)
treef24faef66b4a3b0bc4784a25c8c83e1197df37bd /paludis/repositories/e/ebuild/utils/newexe
parent973da69b343a263d44d45ff1a7831d42d32c22a8 (diff)
downloadpaludis-2f0c98385684988519b9fb163448f5816c7fc3d2.tar.gz
paludis-2f0c98385684988519b9fb163448f5816c7fc3d2.tar.xz
new* can use stdin in EAPI 5
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 236b48d..4087385 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}"