view src/mkinstalldirs @ 7189:0b4387f570ec v7.4.904

commit https://github.com/vim/vim/commit/6407b3e80d7d7f8f0797c13ae35cc06f96be46c9 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 2 12:50:55 2015 +0100 patch 7.4.904 Problem: Vim does not provide .desktop files. Solution: Include and install .desktop files. (James McCoy, closes #455)
author Christian Brabandt <cb@256bit.org>
date Mon, 02 Nov 2015 13:00:04 +0100
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