simplify subscribing/unsubscribing podcasts
[mygpo.git] / install / install.sh
blob7180a4928de4d3bb2bbb476ee2acc064a43cdafd
1 #!/bin/sh
2 # my.gpodder.org initial database setup
3 # Thomas Perl; 2010-03-31
5 USER=mygpo
6 DB=mygpo
8 LOGFILE=install.log
9 SQL_SCRIPTS="create-db.sql update-*.sql sanitizing-rules.sql"
11 MYSQL="mysql -u $USER $DB -vv"
13 cat <<EOF
15 ===================================
16 my.gpodder.org Initial Installation
17 ===================================
19 THIS SCRIPT IS INTENDED FOR INITIAL INSTALLATION ONLY.
20 DO NOT USE THIS SCRIPT IF YOU ARE UPGRADING YOUR DB!!!
22 Press ENTER to continue or Ctrl+C to abort...
23 EOF
25 read ME
27 (for file in $SQL_SCRIPTS; do
28 $MYSQL < $file || exit 1
29 done) 2>&1 | tee $LOGFILE
31 cat <<EOF
33 If you can read this, there is a high probability that
34 everything went okay. Please check the screen output
35 for details. In case of problems, the output has been
36 written to a file that you can use for bug reporting:
38 $LOGFILE
40 EOF