mktemp templates
This commit is contained in:
parent
9fe6058fbf
commit
82c81822d3
4
urchin
4
urchin
|
@ -81,7 +81,7 @@ epoch_pax() {
|
||||||
mktemp_dir() {
|
mktemp_dir() {
|
||||||
# Support HP-UX mktemp that has wrong exit codes and
|
# Support HP-UX mktemp that has wrong exit codes and
|
||||||
# can't make directories.
|
# can't make directories.
|
||||||
tmp=$(mktemp)
|
tmp=$(mktemp /tmp/urchin.XXXXXXXX)
|
||||||
if test -f "${tmp}"; then
|
if test -f "${tmp}"; then
|
||||||
rm "${tmp}"
|
rm "${tmp}"
|
||||||
fi
|
fi
|
||||||
|
@ -89,7 +89,7 @@ mktemp_dir() {
|
||||||
echo "${tmp}"
|
echo "${tmp}"
|
||||||
}
|
}
|
||||||
mktemp_file() {
|
mktemp_file() {
|
||||||
tmp=$(mktemp)
|
tmp=$(mktemp /tmp/urchin.XXXXXXXX)
|
||||||
if ! test -f "${tmp}"; then
|
if ! test -f "${tmp}"; then
|
||||||
> "${tmp}"
|
> "${tmp}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user