#!/bin/bash # Generate SNB dataset. function print_help () { echo "Usage: $0 [OPTION]" echo "Optional arguments:" echo -e " -h|--help -> Prints help." echo -e " --scale-factor Positive_Integer -> Defines the dataset size." } set -e script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Read the arguments. scale_factor=1 while [[ $# -gt 0 ]] do case $1 in -h|--help) print_help exit 1 ;; --scale-factor) scale_factor=$2 shift ;; *) # unknown option ;; esac shift # past argument or value done echo "Using scale_factor" $scale_factor # Prepare the folder structure. dataset_folder_prefix="neo4j_csv_dataset" dataset_folder="${script_dir}/${dataset_folder_prefix}_scale_${scale_factor}" mkdir -p ${dataset_folder} rm -rf ${dataset_folder}/* # Define scale factor. cat > ${script_dir}/ldbc_snb_datagen/params.ini <