view scripts/createdirectory.sh @ 502:33574b94f09e

corrected a bug and improved code
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 27 May 2014 15:43:14 -0400
parents 626560624d55
children
line wrap: on
line source

#!/bin/bash
DIRECTORY=$1
if [[ ! -d "${DIRECTORY}" && ! -L "${DIRECTORY}" ]] ; then
    echo "creating directory ${DIRECTORY}"
    mkdir "${DIRECTORY}"
fi
#if [[ -d "${DIRECTORY}" && ! -L "${DIRECTORY}" ]] ; then