mi024

College project "Projet IAD" master 1
git clone https://esimon.eu/repos/mi024.git
Log | Files | Refs | README

setup database.sh (314B)


      1 #!/bin/sh
      2 
      3 if [ $# -ne 1 ]; then
      4 	echo "usage: $0 database_name"
      5 	exit 1
      6 fi
      7 
      8 command -v sqlite >/dev/null 2>&1 || { echo 'error: The sqlite binary is not in your $PATH'; exit 1; } || true
      9 
     10 sql="CREATE TABLE views (name VARCHAR(255) PRIMARY KEY, kind VARCHAR(255), description TEXT, data BLOB);"
     11 sqlite "$1" "$sql"