File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / mod_files.sh
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

#! /bin/sh

if test "$2" = ""; then
	echo "usage: $0 basedir depth"
	exit 1
fi

if test "$2" = "0"; then
	exit 0
fi

hash_chars="0 1 2 3 4 5 6 7 8 9 a b c d e f"
if test "$3" -a "$3" -ge "5"; then
  hash_chars="$hash_chars g h i j k l m n o p q r s t u v"
  if test "$3" -eq "6"; then
    hash_chars="$hash_chars w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - ,"
  fi
fi

for i in $hash_chars; do
	newpath="$1/$i"
	mkdir $newpath || exit 1
	sh $0 $newpath `expr $2 - 1` $3
done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>