- # We dump and keep only inserts
- sqlite "$db" '.dump identities' | \
- awk '/^INSERT INTO/ {start = 1} {if (start == 1) print}' | \
- head -n -2 | \
- sed 's/^\(INSERT INTO identities \)/\1(identity_id, user_id, del, standard, name, organization, email, "reply-to", bcc, signature) /'
- echo 'COMMIT;' ) > $upgrade_tmp
- sqlite "$db" < $upgrade_tmp
- rm $upgrade_tmp
- echo "OK"
- fi
- ;;
- *)
- # Do nothing
- ;;
- esac
+ # We dump and keep only inserts
+ sqlite "$db" '.dump identities' | \
+ awk '/^INSERT INTO/ {start = 1} {if (start == 1) print}' | \
+ head -n -2 | \
+ sed 's/^\(INSERT INTO identities \)/\1(identity_id, user_id, del, standard, name, organization, email, "reply-to", bcc, signature) /'
+ echo 'COMMIT;' ) > $upgrade_tmp
+ sqlite "$db" < $upgrade_tmp
+ rm $upgrade_tmp
+ echo "OK"
+ fi
+ ;;
+ *)
+ # Do nothing
+ ;;
+ esac
+ }