Date: Wed, 23 Mar 2011 14:24:43 -0700 From: Chuck Swiger <cswiger@mac.com> To: Polytropon <freebsd@edvax.de> Cc: Ryan Coleman <editor@d3photography.com>, FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: Automating mounting of ISO images Message-ID: <1ACB836D-CDF9-490D-A27D-C23B8F8167D8@mac.com> In-Reply-To: <20110323222143.d155ada6.freebsd@edvax.de> References: <21012F71-5038-45F1-98C6-72A0B1239009@d3photography.com> <31D3BED1-7035-435F-B127-EFAAF6AFF076@mac.com> <20D9B390-3190-4865-A19E-BDEDC595E7A2@d3photography.com> <6120FA66-E11C-4DFD-BF34-915807B3DA2B@mac.com> <20110323222143.d155ada6.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 23, 2011, at 2:21 PM, Polytropon wrote: > Prefix it with a test: > > [ -d /mount/office_files/images/${DEST} ] && mkdir... > mount... > > so there will be no error if the script is started for the > second time (and the directories still exist), means: create > them only if not yet present. While I agree with this suggested change from the perspective of only doing work if you actually need to do it, note that "mkdir -p" doesn't return an error if the directory already exists. :-) Regards, -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1ACB836D-CDF9-490D-A27D-C23B8F8167D8>