Debian Codegraph @

tests/API/probes/gentree.sh

raw symbols SCIP
1 #!/bin/sh
2
3 RET_INTERNAL=2
4 RET_FAILED=1
5 RET_SUCCESS=0
6
7 ROOT=$1
8
9 if [ -z "$ROOT" ]; then
10 echo "Usage: $1 <rootdir>"
11 exit 1
12 fi
13
14 mkdir -p "${ROOT}" && pushd "${ROOT}" || exit $RET_INTERNAL
15
16 for subdir in A B C D E F; do
17 mkdir -p "${subdir}" || exit $RET_INTERNAL
18 pushd "${subdir}"
19 for subdir_file in 0 1 2 3 4 5 6 7 8 9; do
20 NAME="${subdir}${subdir_file}"
21 RANDLEN=$(LANG=C egrep -ioam1 '[1-9][0-9]' /dev/urandom | head -n 1)
22 touch $NAME
23 openssl rand $RANDLEN > $NAME
24 done
25 popd
26 done