diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
|---|---|---|
| committer | <> | 2013-04-03 16:25:08 +0000 |
| commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
| tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/session/mod_files.sh | |
| download | php2-master.tar.gz | |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/session/mod_files.sh')
| -rw-r--r-- | ext/session/mod_files.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/session/mod_files.sh b/ext/session/mod_files.sh new file mode 100644 index 0000000..1d26728 --- /dev/null +++ b/ext/session/mod_files.sh @@ -0,0 +1,24 @@ +#! /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 |
