Changeset 34495 for main


Ignore:
Timestamp:
2020-10-19T18:15:59+13:00 (4 years ago)
Author:
davidb
Message:

Refactored and adjusted for new location of file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/cambridge-museum/collect/waikato-independent/PREPARE-FOR-IMPORT.sh

    r34487 r34495  
    55# cp ../../../../../../waikato-independent-db/WAIKATO_INDEPENDENT.csv import.holding/.
    66
    7 if [ ! -f pre-import/WAIKATO_INDEPENDENT.csv ] ; then
    8     echo "Error: Failed to find pre-import/WAIKATO_INDEPENDENT.csv to generate sample CSV file in 'import'" >&2
     7input_csv_file="pre-import/MSAccessToCSV/WAIKATO_INDEPENDENT.csv"
     8output_csv_file="import/wi-head${head_n_arg}.csv"
     9
     10if [ ! -f $input_csv_file ] ; then
     11    echo "Error: Failed to find $input_csv_file to generate sample CSV file in 'import'" >&2
    912    exit 1
    1013fi
    1114
    1215echo "Generating CSV sample from head 1..$head_n_arg"
    13 echo "  pre-import/WAIKATO_INDEPENDENT.csv -> import/wi-head${head_n_arg}.csv"
     16echo "  $input_csv_file -> $output_csv_file"
    1417
    15 head -n $head_n_arg pre-import/WAIKATO_INDEPENDENT.csv  > import/wi-head${head_n_arg}.csv
     18head -n $head_n_arg "$input_csv_file"  > "$output_csv_file"
Note: See TracChangeset for help on using the changeset viewer.