Ignore:
Timestamp:
2014/06/14 00:23:36 (7 years ago)
Author:
shutta
Message:

#1980 インストールシェルの2.12対応
追加SQL文実行処理部分を一時ファイルを生成せずに処理するよう改良。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/eccube_install.sh

    r23552 r23553  
    139139} 
    140140 
     141get_optional_sql() 
     142{ 
     143    echo "INSERT INTO dtb_member (member_id, login_id, password, salt, work, del_flg, authority, creator_id, rank, update_date) VALUES (2, 'admin', '${ADMINPASS}', '${AUTH_MAGIC}', '1', '0', '0', '0', '1', current_timestamp);" 
     144    echo "INSERT INTO dtb_baseinfo (id, shop_name, email01, email02, email03, email04, top_tpl, product_tpl, detail_tpl, mypage_tpl, update_date) VALUES (1, '${SHOP_NAME}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', 'default1', 'default1', 'default1', 'default1', current_timestamp);" 
     145} 
     146 
    141147create_config_php() 
    142148{ 
     
    193199#-- Setup Database 
    194200SQL_DIR="./html/install/sql" 
    195 OPTIONAL_SQL_FILE=optional.sql 
    196 if [ -f ${OPTIONAL_SQL_FILE} ] 
    197 then 
    198     echo "remove optional SQL" 
    199     rm ${OPTIONAL_SQL_FILE} 
    200 fi 
    201  
    202 echo "create optional SQL..." 
    203 echo "INSERT INTO dtb_member (member_id, login_id, password, salt, work, del_flg, authority, creator_id, rank, update_date) VALUES (2, 'admin', '${ADMINPASS}', '${AUTH_MAGIC}', '1', '0', '0', '0', '1', current_timestamp);" >> ${OPTIONAL_SQL_FILE} 
    204 echo "INSERT INTO dtb_baseinfo (id, shop_name, email01, email02, email03, email04, top_tpl, product_tpl, detail_tpl, mypage_tpl, update_date) VALUES (1, '${SHOP_NAME}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', 'default1', 'default1', 'default1', 'default1', current_timestamp);" >> ${OPTIONAL_SQL_FILE} 
    205201 
    206202case "${DBTYPE}" in 
     
    218214    create_sequence_tables 
    219215    echo "execute optional SQL..." 
    220     sudo -u ${PGUSER} ${PSQL} -U ${DBUSER} -f ${OPTIONAL_SQL_FILE} ${DBNAME} 
     216    get_optional_sql | sudo -u ${PGUSER} ${PSQL} -U ${DBUSER} ${DBNAME} 
    221217;; 
    222218"mysql" ) 
     
    242238    create_sequence_tables 
    243239    echo "execute optional SQL..." 
    244     ${MYSQL} -u ${DBUSER} ${PASSOPT} ${DBNAME} < ${OPTIONAL_SQL_FILE} 
     240    get_optional_sql | ${MYSQL} -u ${DBUSER} ${PASSOPT} ${DBNAME} 
    245241;; 
    246242esac 
Note: See TracChangeset for help on using the changeset viewer.