diff options
author | Rahul C S <rahulcs@redhat.com> | 2012-02-17 17:23:28 +0530 |
---|---|---|
committer | Rahul C S <rahulcs@redhat.com> | 2012-02-17 17:24:19 +0530 |
commit | db468693ef5faa294d9bc3cd3c5d70c0d99d488b (patch) | |
tree | f552d0a8e88304dba5038eac670a5c7afe3c267e /perf-framework/glusterfs-precreate.sh | |
parent | 01a77a1ae18d9add01f893e06e58191b065602e8 (diff) |
Adding the performance framework to the qa repo
Change-Id: Ia7dbd82e9bb2e5e65e9345234ce34f8518a091ad
Signed-off-by: Rahul C S <rahulcs@redhat.com>
Diffstat (limited to 'perf-framework/glusterfs-precreate.sh')
-rwxr-xr-x | perf-framework/glusterfs-precreate.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/perf-framework/glusterfs-precreate.sh b/perf-framework/glusterfs-precreate.sh new file mode 100755 index 0000000..d1c92a3 --- /dev/null +++ b/perf-framework/glusterfs-precreate.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e; + +if [ $# -eq 0 ]; then + echo "Usage: $0 <dir1> [dir2 [dir3 [dir4 ...]]]"; + exit 1 +fi + +for dir in "$@"; do + if [ ! -d "$dir" ]; then + echo "$0: $dir not a directory" + exit 1; + fi +done + +subdirs="{00" +for i in {1..255}; do + n=$(printf "%02x" $i); + subdirs="$subdirs,$n"; +done +subdirs="$subdirs}" + +mkdir -v "$dir/.glusterfs"; + +for dir in $@; do + for i in {0..255}; do + n=$(printf "%02x" $i); + mkdir -v "$dir/.glusterfs/$n" + eval "mkdir -v $dir/.glusterfs/$n/$subdirs" + done +done
\ No newline at end of file |