Permalink
Browse files

(no bug) exit if any table fails to import

  • Loading branch information...
1 parent d8ab662 commit a08eea160610229eb0527efa24de2932f21f3ac3 @rhelmer rhelmer committed Apr 12, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 tools/dataload/import.sh
View
@@ -5,4 +5,10 @@ TABLES="daily_crash_codes os_names os_name_matches process_types products releas
for table in $TABLES
do
psql -c "COPY $table FROM '`pwd`/${table}.csv' WITH CSV HEADER" breakpad
+ exit_code=$?
+ if [ $exit_code != 0 ]
+ then
+ echo "Failed to import ${table}"
+ exit $exit_code
+ fi
done

0 comments on commit a08eea1

Please sign in to comment.