mirror of
https://github.com/MedzikUser/HomeDisk.git
synced 2024-08-14 21:46:53 +00:00
scripts (create-sqlite-db): move to scripts
dir and edit it
This commit is contained in:
parent
c5b76d8b90
commit
e6f5be15e4
3 changed files with 13 additions and 6 deletions
|
@ -2,6 +2,4 @@
|
|||
|
||||
## 🖴 Create SQLite Database
|
||||
|
||||
```bash
|
||||
sqlite3 homedisk.db < tables.sql
|
||||
```
|
||||
Run file `./scripts/create-sqlite-database.sh` to create SQLite database file.
|
||||
|
|
12
scripts/create-sqlite-database.sh
Executable file
12
scripts/create-sqlite-database.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f 'homedisk.db' ]
|
||||
then
|
||||
echo 'Database `homedisk.db` exists!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create a database using the commands from the `tables.sql` file
|
||||
sqlite3 homedisk.db < tables.sql
|
||||
|
||||
echo 'Created SQLite database `homedisk.db`!'
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
sqlite3 homedisk.db < tables.sql
|
Loading…
Reference in a new issue