1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
samba-mirror/source3/script/installdirs.sh
Lars Müller a71e4baaf6 r13644: Do not shift anything inside the for loop away. We ineterate over $@.
(This used to be commit 3aa75f0ff589a3fdeaa9daa5ae75b3381c3e8eea)
2007-10-10 11:10:20 -05:00

19 lines
333 B
Bash
Executable File

#!/bin/sh
INSTALLPERMS=$1
DESTDIR=`echo $2 | sed 's/\/\//\//g'`
shift
shift
for dir in $@; do
DIRNAME=`echo $dir | sed 's/\/\//\//g'`
if [ ! -d $DESTDIR/$DIRNAME ]; then
mkdir -m $INSTALLPERMS -p $DESTDIR/$DIRNAME
fi
if [ ! -d $DESTDIR/$DIRNAME ]; then
echo "Failed to make directory $DESTDIR/$DIRNAME "
exit 1
fi
done