Skip to content

Commit cf727a7

Browse files
committed
Script cleanup
1 parent 9847899 commit cf727a7

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

bin/imports/import-csv.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ fi
121121
query_id=$(uuidgen | tr '[:upper:]' '[:lower:]')
122122

123123
# Add the CONSTRUCT query to the item using fragment identifier
124-
# TO-DO: fix ambigous add-construct.sh script names
125-
"$(dirname "$0")/../add-construct.sh" \
124+
add-construct.sh \
126125
-b "$base" \
127126
-f "$cert_pem_file" \
128127
-p "$cert_password" \
@@ -148,10 +147,7 @@ add-file.sh \
148147

149148
# Calculate file URI from SHA1 hash
150149
sha1sum=$(shasum -a 1 "$csv_file" | awk '{print $1}')
151-
file_uri="${base}uploads/${sha1sum}"
152-
153-
# Generate import ID for fragment identifier
154-
import_id=$(uuidgen | tr '[:upper:]' '[:lower:]')
150+
file="${base}uploads/${sha1sum}"
155151

156152
# Add the import metadata to the import item using fragment identifier
157153
add-csv-import.sh \
@@ -160,9 +156,8 @@ add-csv-import.sh \
160156
-p "$cert_password" \
161157
--proxy "$proxy" \
162158
--title "$title" \
163-
--uri "#${import_id}" \
164159
--query "$query" \
165-
--file "$file_uri" \
160+
--file "$file" \
166161
--delimiter "$delimiter" \
167162
"$target"
168163

bin/imports/import-rdf.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ if [ -n "$query_file" ] ; then
125125
query_id=$(uuidgen | tr '[:upper:]' '[:lower:]')
126126

127127
# Add the CONSTRUCT query to the item using fragment identifier
128-
# TO-DO: fix ambigous add-construct.sh script names
129-
"$(dirname "$0")/../add-construct.sh" \
128+
add-construct.sh \
130129
-b "$base" \
131130
-f "$cert_pem_file" \
132131
-p "$cert_password" \

0 commit comments

Comments
 (0)