To create an installation package in the form of an SH file, follow these steps:
create the <application name>-<version number>-<release number>.sh file and make it executable: chmod 777 <file_name>
include in the SH file the header with the code responsible for decoding UUENCODE, a block with the language pack TAR archive, unpacking this archive, copying files in the required place, setting up config files and for further removing temporary installation catalogs and files.
For example:
| #
Copyright (c) 2004 by SWsoft, Inc. # All rights reserved # #ident "@(#)plesk 7.0 04/02/02 SWsoft" # # accumulates
chown and chmod chown
$u_owner:$g_owner $node || die "chown $u_owner:$g_owner $node" p_echo() |
It's required to set a corresponding value for several variables in this block:
You may find a more detailed info on names of locales here.
create the file structure that would correspond to the future location of language pack files:
|
<PRODUCT_ROOT_DIR>/admin
|
rewrite localization files in these directories.
create the psa_locale_<localeID>.tar.gz archive to pack the received file structure in.
encode this tar.gz file with the help of the UUENCODE utility and add the received code in the SH file body:
uuencode psa_locale_de-DE.tar.gz psa_locale_de-DE.ta.gz >> psa_locale_de-DE.sh
As a result, you will receive the file with the following structure:
|
... exit 0 |