wok-current diff tramys-client/stuff/tramys2 @ rev 17090

tramys-client: make virtual package tramys-data (you can: tazpkg info tramys-data, tazpkg list-files tramys-data, or tazpkg remove tramys-data); better locale change.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Aug 27 22:27:18 2014 +0300 (2014-08-27)
parents e96aa956e72e
children bf52d3ac4b95
line diff
     1.1 --- a/tramys-client/stuff/tramys2	Tue Aug 26 13:31:50 2014 +0300
     1.2 +++ b/tramys-client/stuff/tramys2	Wed Aug 27 22:27:18 2014 +0300
     1.3 @@ -5,6 +5,7 @@
     1.4  
     1.5  . /etc/slitaz/slitaz.conf
     1.6  . /lib/libtaz.sh
     1.7 +. /etc/locale.conf
     1.8  
     1.9  # Ask for root access in order to install the files in the system.
    1.10  if [ $(id -u) != 0 ]; then
    1.11 @@ -30,7 +31,7 @@
    1.12  Your current locale: <b>$LANG</b>')" \
    1.13  	--button "gtk-edit:2" --button "gtk-cancel:1" --button "gtk-go-forward:0"
    1.14  case $? in
    1.15 -	2) tazbox locale; exit 0 ;;
    1.16 +	2) tazbox locale; tramys2; exit 0 ;;
    1.17  	1) exit 0 ;;
    1.18  esac
    1.19  
    1.20 @@ -88,8 +89,34 @@
    1.21  # /usr/share/locale, etc. would be owned by user www and become unavailable
    1.22  # for a regular user. So force all folders and files to root own.
    1.23  chown -R root:root $WORKING
    1.24 +
    1.25 +# Create or recreate virtual package "tramys-data".
    1.26 +# It contains all translations.
    1.27 +# And you can remove it if you no longer need translations.
    1.28 +TD=$INSTALLED/tramys-data
    1.29 +mkdir -p $TD
    1.30 +cat <<EOT > $TD/receipt
    1.31 +# SliTaz package receipt.
    1.32 +
    1.33 +PACKAGE="tramys-data"
    1.34 +VERSION="$(date +%y%m%d)"
    1.35 +CATEGORY="system-tools"
    1.36 +SHORT_DESC="This package contains translation files installed by tramys-client"
    1.37 +MAINTAINER="you@slitaz.org"
    1.38 +LICENSE="GPL"
    1.39 +WEB_SITE="http://www.slitaz.org/"
    1.40 +DEPENDS="tramys-client"
    1.41 +EOT
    1.42 +# Update files list.
    1.43 +cd $WORKING; find . -type f | sed 's|^./|/|g' >> $TD/files.list
    1.44 +sort -u $TD/files.list -o $TD/files.list
    1.45 +
    1.46  # copy all translation files to root file system.
    1.47  cp -fpr $WORKING/* /
    1.48 +
    1.49 +# Recreate md5sums.
    1.50 +md5sum $(cat $TD/files.list) > $TD/md5sum
    1.51 +
    1.52  # remove temporary folder and file, they are no longer needed.
    1.53  rm -f $TGZ
    1.54  rm -rf $WORKING