support process substitution
This commit is contained in:
parent
2982d34973
commit
7ba96e9da1
|
@ -17,6 +17,15 @@ function init_import() {
|
||||||
files[$i]="${tmpdir}/${files[$i]//[^A-Za-z0-9._-]/_}"
|
files[$i]="${tmpdir}/${files[$i]//[^A-Za-z0-9._-]/_}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
# read pipes if name starts with /dev/fd
|
||||||
|
for i in "${!files[@]}"; do
|
||||||
|
if [[ ${files[$i]} == "/dev/fd"* ]]; then
|
||||||
|
if ! cat "${files[$i]}" >"${tmpdir}/${files[$i]//[^A-Za-z0-9._-]/_}"; then
|
||||||
|
error "reading of ${files[$i]} failed!"
|
||||||
|
fi
|
||||||
|
files[$i]="${tmpdir}/${files[$i]//[^A-Za-z0-9._-]/_}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
# create a zip archive if there are multiple files
|
# create a zip archive if there are multiple files
|
||||||
if [[ ${#files[@]} -gt 1 ]]; then
|
if [[ ${#files[@]} -gt 1 ]]; then
|
||||||
file="$tmpdir/Untitled.zip"
|
file="$tmpdir/Untitled.zip"
|
||||||
|
|
Loading…
Reference in New Issue