Back to home page

MITgcm

 
 

    


Warning, /tools/mpack-1.6/mkinstalldirs is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
ec6cf3b09d Ed H*0001 #! /bin/sh
                0002 # mkinstalldirs --- make directory hierarchy
                0003 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
                0004 # Created: 1993-05-16
                0005 # Public domain
                0006 
                0007 errstatus=0
                0008 
                0009 for file
                0010 do
                0011    set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
                0012    shift
                0013 
                0014    pathcomp=
                0015    for d
                0016    do
                0017      pathcomp="$pathcomp$d"
                0018      case "$pathcomp" in
                0019        -* ) pathcomp=./$pathcomp ;;
                0020      esac
                0021 
                0022      if test ! -d "$pathcomp"; then
                0023         echo "mkdir $pathcomp"
                0024 
                0025         mkdir "$pathcomp" || lasterr=$?
                0026 
                0027         if test ! -d "$pathcomp"; then
                0028           errstatus=$lasterr
                0029         fi
                0030      fi
                0031 
                0032      pathcomp="$pathcomp/"
                0033    done
                0034 done
                0035 
                0036 exit $errstatus
                0037 
                0038 # mkinstalldirs ends here