Skip to content

Commit

Permalink
fix "mktemp -d --tmpdir" on Mac OS; see #1453
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Oct 6, 2018
1 parent 424dbd5 commit 4044ba8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/training/tesstrain_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ parse_flags() {

# Location where intermediate files will be created.
TIMESTAMP=`date +%Y-%m-%d`
if [ "$(uname)" == "Darwin" ];then
TMP_DIR=$(mktemp -d -t ${LANG_CODE}-${TIMESTAMP}.XXX )
else
TMP_DIR=$(mktemp -d --tmpdir ${LANG_CODE}-${TIMESTAMP}.XXX )
fi
TRAINING_DIR=${TMP_DIR}
# Location of log file for the whole run.
LOG_FILE=${TRAINING_DIR}/tesstrain.log
Expand Down

0 comments on commit 4044ba8

Please sign in to comment.