1 # arg 1: the new package version
3 cp /home/httpd/html/vcddb/setup/config.default /home/httpd/html/vcddb/config.php
4 chmod 666 /home/httpd/html/vcddb/config.php
6 echo "> 1- You should uncomment ;extension=gd.so ;extension=mysql.so"
7 echo " and set allow_url_fopen = On into your /etc/php/php.ini file."
9 echo "> 2- Create an empty database:"
10 echo " mysqladmin create <dbname> -u root -p"
12 echo "> 3- Open http://<yourhost>/vcddb/setup"
13 echo " Then press Continue and follow the instructions."
15 echo "> 4- After a successfull install, delete the setup folder"
16 echo " and chmod 644 /home/httpd/html/vcddb/config.php"
17 echo " to prevent any further writing or modification to the file."
23 # arg 1: the new package version
24 # arg 2: the old package version
26 if [ ! -e /home/httpd/html/vcddb/config.php ]; then
27 cp /home/httpd/html/vcddb/setup/config.default /home/httpd/html/vcddb/config.php
28 chmod 666 /home/httpd/html/vcddb/config.php
31 prev_version=`echo "$2" | awk -F. '{print $2}' | awk -F- '{print $1}'`
32 new_version=`echo "$1" | awk -F. '{print $2}' | awk -F- '{print $1}'`
34 if [ "$prev_version" -ne "$new_version" ]; then
36 echo "If you upgrade from vcd-db-0.$prev_version you must follow the bellow instructions:"
38 echo " (Optional: backup your database)"
42 if [ $prev_version -ge 984 -a $prev_version -le 990 ]; then
43 # rm -rf /home/httpd/html/vcddb/setup
44 chmod 644 /home/httpd/html/vcddb/config.php
45 echo ">1- Open the vcddb/setup/upgrade.php on your server and follow the instructions to finish the upgrade"
46 echo ">2- Delete the setup folder (rm -rf /home/httpd/html/vcddb/setup)"
49 if [ "$prev_version" -eq "983" ] || [ "$prev_version" -eq "982" ]; then
50 echo ">1- Edit your '/home/httpd/html/vcddb/config.php' file and enter the same settings"
51 echo " you had in your '/home/httpd/html/vcddb/classes/VCDConstants.php' file"
52 echo " Now you can delete the file VCDConstants.php (it is no longer used)"
54 echo ">2- Log into your mysql vcd-db database:"
55 echo " mysql -u <db_user> -p <db_catalog>"
57 echo " ALTER TABLE vcd_MetaData CHANGE metadata_value metadata_value VARCHAR( 250 ) NOT NULL;"
58 echo " ALTER TABLE vcd_RssFeeds ADD isAdult TINYINT NULL DEFAULT '0', ADD isSite TINYINT NULL DEFAULT '0';"
59 echo " INSERT INTO vcd_UserRoles(role_name, role_description) VALUES ('Adult User', 'User with Adult options enabled');"
60 echo " UPDATE vcd_MetaDataTypes SET type_name='defaultdvd', type_description='Default DVD Settings' WHERE type_id=20;"
62 echo ">3- Open the vcddb/setup/upgrade.php on your server"
64 echo ">4- After a successfull install, delete the setup folder"
65 echo " and chmod 644 /home/httpd/html/vcddb/config.php"
66 echo " to prevent any further writing or modification to the file."
69 if [ "$prev_version" -lt "982" ]; then
70 echo "***UPGRADING FROM VERSION PRIOR TO 0.982 IS NOT LONGER POSSIBLE FROM THIS PACKAGE!"
71 echo "***PLEASE, TRY TO UPDATE MANUALLY!"
74 #if [ "$prev_version" -eq "981" ] || [ "$prev_version" -eq "980" ]; then
75 #echo ">1- Copy your database settings (and proxy server settings if necessary)"
76 #echo " from '/home/httpd/html/vcddb/classes/VCDConstants.php'"
77 #echo " to the new '/home/httpd/html/vcddb/classes/VCDConstants.php.pacnew' file."
78 #echo " Then: mv VCDConstants.php.pacnew VCDConstants.php"
80 #echo ">2- Log into your mysql vcd-db database:"
81 #echo " mysql -u <db_user> -p <db_catalog>"
83 #echo " ALTER TABLE vcd_SourceSites ADD site_classname VARCHAR(20) NULL AFTER site_isFetchable;"
84 #echo " ALTER TABLE vcd_SourceSites ADD site_image VARCHAR(50) NULL AFTER site_classname;"
86 #echo ">3- Open your browser and go to http://<your host>/vcddb/setup/"
87 #echo " Then select the UPGRADE button."
89 #echo ">4- After a successfull update, delete the setup folder"
90 #echo " and chmod 0644 /home/httpd/html/vcddb/classes/VCDConstants.php"
91 #echo " to prevent any further writing or modification to the file."
94 #if [ "$prev_version" -lt "980" ]; then
95 #echo ">1- First, you should remove this version from your computer:"
96 #echo " pacman -R vcd-db"
97 #echo ">2- Then, you will have to download an older release from:"
98 #echo " http://personales.ya.com/vmromanos/arch/pkgs/vcd-db-0.981-1.pkg.tar.gz"
99 #echo " and upgrade from that version. After that, upgrade again with the latest version."
105 # arg 1: the old package version