view scripts/createdirectory.sh @ 1129:e257643b1d0e Etienne-Beauchamp/added-d-optional-argument-1581358671588

forgot the conditional case
author Etienne Beauchamp <etienne-2.beauchamp@polymtl.ca>
date Mon, 10 Feb 2020 18:46:24 +0000
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