From 19a7e23cccb1b2f07b61ccbb11341ac85d37b9b1 Mon Sep 17 00:00:00 2001 From: Evan Shelhamer Date: Wed, 19 Mar 2014 22:29:17 -0700 Subject: [PATCH] fix script path incantation --- data/cifar10/get_cifar10.sh | 2 +- data/ilsvrc12/get_ilsvrc_aux.sh | 2 +- data/mnist/get_mnist.sh | 2 +- scripts/build_and_deploy_docs.sh | 2 +- tools/extra/parse_log.sh | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/cifar10/get_cifar10.sh b/data/cifar10/get_cifar10.sh index 23e09eed847..623c848513e 100755 --- a/data/cifar10/get_cifar10.sh +++ b/data/cifar10/get_cifar10.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # This scripts downloads the CIFAR10 (binary version) data and unzips it. -DIR="$(readlink -f $(dirname "$0"))" +DIR="$( cd "$(dirname "$0")" ; pwd -P )" cd $DIR echo "Downloading..." diff --git a/data/ilsvrc12/get_ilsvrc_aux.sh b/data/ilsvrc12/get_ilsvrc_aux.sh index dad17ff0e72..b8b4944bc5d 100755 --- a/data/ilsvrc12/get_ilsvrc_aux.sh +++ b/data/ilsvrc12/get_ilsvrc_aux.sh @@ -6,7 +6,7 @@ # - synset ids and words # - the training splits with labels -DIR="$(readlink -f $(dirname "$0"))" +DIR="$( cd "$(dirname "$0")" ; pwd -P )" cd $DIR echo "Downloading..." diff --git a/data/mnist/get_mnist.sh b/data/mnist/get_mnist.sh index 9ece28f77db..8eb6aeedf9f 100755 --- a/data/mnist/get_mnist.sh +++ b/data/mnist/get_mnist.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # This scripts downloads the mnist data and unzips it. -DIR="$(readlink -f $(dirname "$0"))" +DIR="$( cd "$(dirname "$0")" ; pwd -P )" cd $DIR echo "Downloading..." diff --git a/scripts/build_and_deploy_docs.sh b/scripts/build_and_deploy_docs.sh index fdb75dbf6a4..b60296139fa 100755 --- a/scripts/build_and_deploy_docs.sh +++ b/scripts/build_and_deploy_docs.sh @@ -15,7 +15,7 @@ MSG=`git log --oneline -1` if [[ $BRANCH = 'master' ]]; then # Find the docs dir, no matter where the script is called - DIR="$(readlink -f $(dirname "$0"))" + DIR="$( cd "$(dirname "$0")" ; pwd -P )" DOCS_SITE_DIR=$DIR/../docs/_site # Make sure that docs/_site tracks remote:gh-pages. diff --git a/tools/extra/parse_log.sh b/tools/extra/parse_log.sh index 998446057e5..01ea6f493a6 100755 --- a/tools/extra/parse_log.sh +++ b/tools/extra/parse_log.sh @@ -1,10 +1,10 @@ #!/bin/bash -# Usage parse_log.sh caffe.log +# Usage parse_log.sh caffe.log # It creates two files one caffe.log.test that contains the loss and test accuracy of the test and # another one caffe.log.loss that contains the loss computed during the training -#get the dirname of the script -DIR="$(readlink -f $(dirname "$0"))" +# get the dirname of the script +DIR="$( cd "$(dirname "$0")" ; pwd -P )" if [ "$#" -lt 1 ] then