This commit is contained in:
Thomas Levine 2016-04-07 02:44:22 +00:00
parent b79045c6ee
commit 81c4cdeac0

9
urchin
View File

@ -71,7 +71,6 @@ fi
epoch_date() { epoch_date() {
date +%s date +%s
} }
epoch_pax() { epoch_pax() {
# Based on http://stackoverflow.com/a/7262588/407226 # Based on http://stackoverflow.com/a/7262588/407226
tmp="$(mktemp_file)" tmp="$(mktemp_file)"
@ -82,12 +81,12 @@ 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.
if test -f "${urchin_tmp}"; then tmp=$(mktemp)
rm "${urchin_tmp}" if test -f "${tmp}"; then
rm "${tmp}"
fi fi
mkdir "${urchin_tmp}" mkdir "${tmp}"
} }
mktemp_file() { mktemp_file() {
tmp=$(mktemp) tmp=$(mktemp)
if ! test -f "${tmp}"; then if ! test -f "${tmp}"; then