Mercurial > vim
view src/mkinstalldirs @ 7164:d3c57e7f489a v7.4.893
commit https://github.com/vim/vim/commit/d1b15dec4d00d7ed5e92ff4e0fb7fc2e0818e479
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 13 16:13:39 2015 +0200
patch 7.4.893
Problem: C indenting is wrong below a "case (foo):" because it is
recognized as a C++ base class construct. Issue #38.
Solution: Check for the case keyword.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 13 Oct 2015 16:15:05 +0200 |
parents | 70c67b1bb1f1 |
children |
line wrap: on
line source
#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 # Public domain errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here