File: install.sh

package info (click to toggle)
note 1.3.26-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 456 kB
  • sloc: perl: 3,497; sh: 102; makefile: 2
file content (33 lines) | stat: -rwxr-xr-x 719 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# installs note
# This is the installer for the mysql version only!

echo "Welcome to note `cat ../VERSION` installation."
echo "the install script will ask you a view questions,"
echo "make sure to answer them correctly!"
echo

/bin/echo -n "creating the note database..."
NAME="_note"
DBNAME="$USER$NAME"
echo "DBNAME=$DBNAME"
mysqladmin create $DBNAME
echo "done."
/bin/echo -n "creating the table structure using defaults..."
mysql $DBNAME < sql

echo "Shall I try to install the required MySQL driver from CPAN?"
read YESNO

case $YESNO in
	"y" | "Y")
		if [ $(id -ru) != 0 ] ; then
			echo "You should be root for that!"
			exit
		fi 
		perl -MCPAN -e shell cpan> install mysql
		;;
esac
echo "done."