#!/bin/bash -e # 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." } script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" base_dir="${script_dir}/../../.." neo4j_dir="${base_dir}/libs/neo4j" build_dir="${base_dir}/build" # Add Maven to PATH export PATH=$PATH:${script_dir}/maven/bin # Read the arguments. scale_factor=1 skip_generating=false 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 # Prepare the folder structure. dataset_dir="${script_dir}/datasets/scale_${scale_factor}" if [ -d ${dataset_dir} ]; then rm -rf ${dataset_dir} fi mkdir -p ${dataset_dir} # Define scale factor. echo "Using scale_factor" $scale_factor cat > ${script_dir}/ldbc_snb_datagen/params.ini <