"Fossies" - the Fresh Open Source Software Archive

Member "note-1.3.26/mysql/install.sh" (16 Aug 2017, 719 Bytes) of package /linux/privat/note-1.3.26.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "install.sh": 1.3.22_vs_1.3.25.

    1 #!/bin/sh
    2 # installs note
    3 # This is the installer for the mysql version only!
    4 
    5 echo "Welcome to note `cat ../VERSION` installation."
    6 echo "the install script will ask you a view questions,"
    7 echo "make sure to answer them correctly!"
    8 echo
    9 
   10 /bin/echo -n "creating the note database..."
   11 NAME="_note"
   12 DBNAME="$USER$NAME"
   13 echo "DBNAME=$DBNAME"
   14 mysqladmin create $DBNAME
   15 echo "done."
   16 /bin/echo -n "creating the table structure using defaults..."
   17 mysql $DBNAME < sql
   18 
   19 echo "Shall I try to install the required MySQL driver from CPAN?"
   20 read YESNO
   21 
   22 case $YESNO in
   23     "y" | "Y")
   24         if [ $(id -ru) != 0 ] ; then
   25             echo "You should be root for that!"
   26             exit
   27         fi 
   28         perl -MCPAN -e shell cpan> install mysql
   29         ;;
   30 esac
   31 echo "done."
   32 
   33