view scripts/createdirectory.sh @ 947:053484e08947

found a more elegant solution, making a copy of the list to iterate
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 21 Jul 2017 11:31:42 -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