Mercurial > sdl-ios-xcode
view test/mkinstalldirs @ 91:e85e03f195b4
From: "Markus F.X.J. Oberhumer"
Subject: SDL CVS patches
below you will find some small patches against the
current SDL CVS.
It adresses these things:
1) Use "&" instead of "%" in some cases. For negative
signed integers (x % 8) is not always (x & 7),
and the compiler can produce slightly faster
code when using "&" here.
2) Some const issues.
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Sat, 07 Jul 2001 20:20:17 +0000 |
parents | 74212992fb08 |
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 # $Id$ 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" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here