Jean McCormack wrote:
> Can Jack look at this, please?
> It's for bug 774: Distro constructor fails when DIST_ISO_SORT is empty
>
> Webrev: http://cr.opensolaris.org/~jeanm/distro_constructor/
>
> Bug: http://defect.opensolaris.org/bz/show_bug.cgi?id=774
>
> Jean
> _______________________________________________
> caiman-discuss mailing list
> caiman-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
Jean
I know you're reworking this and I hope this helps...
I think the safest way to check it is like this:
if [[ -f "${DIST_ISO_SORT}" ]]; then
As the way you have it coded will match ""
e.g.:
% DIST_ISO_SORT=""
% if [ -f $DIST_ISO_SORT ]; then echo "File found"; fi
File found
% if [ -s $DIST_ISO_SORT ]; then echo "File found"; fi
File found
% echo $DIST_ISO_SORT
%
% if [[ -f "${DIST_ISO_SORT}" ]]; then echo "File found"; fi
%
Joe