Chromium Code Reviews| Index: get_latest_image.sh |
| diff --git a/get_latest_image.sh b/get_latest_image.sh |
| index 020cadf9dca0335bedf7af4c5370bc5100977b3f..c77b44a9a5d565673268267145ae1e3568e5f50b 100755 |
| --- a/get_latest_image.sh |
| +++ b/get_latest_image.sh |
| @@ -30,7 +30,11 @@ IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" |
| # If there are no images, return nothing |
| [ -d $IMAGES_DIR ] || exit 0 |
| -# Default to the most recent image |
| -DEFAULT_FROM="${IMAGES_DIR}/`ls -t $IMAGES_DIR | head -1`" |
| +# Use latest link if it exists, otherwise most recently changed dir |
| +if [ -L ${IMAGES_DIR}/latest ] ; then |
| + DEFAULT_FROM="${IMAGES_DIR}/`readlink ${IMAGES_DIR}/latest`" |
|
davidjames
2010/08/05 03:59:26
Please remove tabs
|
| +else |
| + DEFAULT_FROM="${IMAGES_DIR}/`ls -t $IMAGES_DIR | head -1`" |
| +fi |
| echo $DEFAULT_FROM |