From 418f0933e1d083aabb50a82327570539b4c38d58 Mon Sep 17 00:00:00 2001 From: Jey Puget Gil Date: Wed, 4 Sep 2024 11:46:13 +0200 Subject: [PATCH] Update generate-n script: - Added configurable product numbers --- generate-n | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/generate-n b/generate-n index 19dbc11..df1b3d4 100755 --- a/generate-n +++ b/generate-n @@ -6,7 +6,7 @@ then fi if [ $# == 0 ] || [ $1 == "-help" ] then - echo "Generator options: ./generate-n ?" + echo "Generator options: ./generate-n ? ? ?" fi # check that $1 is a integer if ! [[ $1 =~ ^[0-9]+$ ]] @@ -16,13 +16,16 @@ then fi number_of_versions=$1 -products_number=${2:-1} +products_number=${2:-100} +products_step=${3:-1000} +products_variability=${4:-1} echo "Generating $number_of_versions versions" +echo "Setting products to $products_number, products step to $products_step and variability to $products_variability" # loop through the number of versions and call ./generate for i in $(seq 1 $number_of_versions) do echo "Generating version $i" - echo "Generating $((products_number + i)) products" - ./generate -s ttl -pc $((products_number + i)) -tc $((i)) -ppt $((i)) -fn "dataset-$i" + echo "Generating $((products_number + i * products_step)) products" + ./generate -s ttl -pc $((products_number + i * products_step)) -tc $((i * products_step)) -ppt $((i * products_variability)) -fn "dataset-$i" done