sup rev 17

Some improvmend on the cosmetic side
author Christophe Lincoln <pankso@slitaz.org>
date Sun Feb 26 18:52:35 2017 +0100 (2017-02-26)
parents 2aef3b78e30a
children 827dfe35cf35
files data/sup-install.desktop libsup.sh po/clients/fr.po sup wok/sup-demo/receip
line diff
     1.1 --- a/data/sup-install.desktop	Sun Feb 26 17:59:31 2017 +0100
     1.2 +++ b/data/sup-install.desktop	Sun Feb 26 18:52:35 2017 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  [Desktop Entry]
     1.5  Type=Application
     1.6 -Name=SUP Install
     1.7 -Exec=terminal -geometry 80x10 -hold -e sup install %f
     1.8 -Icon=system-software-installer
     1.9 +Name=Install SUP Package
    1.10 +Exec=terminal -geometry 80x20 -hold -e sup install %f
    1.11 +Icon=package-install
    1.12  NoDisplay=true
    1.13  MimeType=application/x-sup;
     2.1 --- a/libsup.sh	Sun Feb 26 17:59:31 2017 +0100
     2.2 +++ b/libsup.sh	Sun Feb 26 18:52:35 2017 +0100
     2.3 @@ -23,14 +23,13 @@
     2.4  supcook="$HOME/sup-cook"
     2.5  cooked="$supcook/packages"
     2.6  
     2.7 +export TEXTDOMAIN='sup-clients'
     2.8 +alias wget="busybox wget"
     2.9 +
    2.10  #
    2.11  # Functions
    2.12  #
    2.13  
    2.14 -get() {
    2.15 -	busybox wget "$1"
    2.16 -}
    2.17 -
    2.18  # Extract a sup package: extract_sup "/path/to/pkg.sup"
    2.19  extract_sup() {
    2.20  	pkg="$(basename ${1%.sup})"
    2.21 @@ -87,7 +86,9 @@
    2.22  	# have to dl and move files where they were in $HOME
    2.23  	cd files
    2.24  	if grep -q "^sup_install" ../receip; then
    2.25 -		gettext "Executing install function:"; colorize 33 " sup_install"
    2.26 +		local in=$(($(stty size | cut -d " " -f 2) - 15))
    2.27 +		gettext "Executing install function:"
    2.28 +		indent ${in} $(colorize 33 " sup_install")
    2.29  		sup_install
    2.30  	fi
    2.31  	
    2.32 @@ -114,5 +115,7 @@
    2.33  	for file in $(ls -A files); do
    2.34  		cp -rf files/${file} ${HOME}
    2.35  	done && status
    2.36 -	rm -rf ${cache} && separator && newline
    2.37 +	separator
    2.38 +	gettext "Installed files:"; colorize 35 " $(cat files.list | wc -l)"
    2.39 +	newline && rm -rf ${cache}
    2.40  }
     3.1 --- a/po/clients/fr.po	Sun Feb 26 17:59:31 2017 +0100
     3.2 +++ b/po/clients/fr.po	Sun Feb 26 18:52:35 2017 +0100
     3.3 @@ -9,11 +9,11 @@
     3.4  "Report-Msgid-Bugs-To: \n"
     3.5  "POT-Creation-Date: 2017-02-23 21:13+0100\n"
     3.6  "PO-Revision-Date: 2017-02-23 14:15+0100\n"
     3.7 -"Last-Translator: Linux User <pankso@slitaz.org>\n"
     3.8 +"Last-Translator: Christophe Lincoln <pankso@slitaz.org>\n"
     3.9  "Language-Team: French\n"
    3.10  "Language: fr\n"
    3.11  "MIME-Version: 1.0\n"
    3.12 -"Content-Type: text/plain; charset=ASCII\n"
    3.13 +"Content-Type: text/plain; charset=UTF-8\n"
    3.14  "Content-Transfer-Encoding: 8bit\n"
    3.15  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
    3.16  "X-Generator: Poedit 1.8.6\n"
     4.1 --- a/sup	Sun Feb 26 17:59:31 2017 +0100
     4.2 +++ b/sup	Sun Feb 26 18:52:35 2017 +0100
     4.3 @@ -6,9 +6,9 @@
     4.4  # Author: Christophe Lincoln <pankso@slitaz.org>
     4.5  #
     4.6  if [ -f "/usr/lib/slitaz/libsup.sh" ]; then
     4.7 +	. ./libsup.sh
     4.8 +else
     4.9  	. /usr/lib/slitaz/libsup.sh
    4.10 -else
    4.11 -	. ./libsup.sh
    4.12  fi
    4.13  
    4.14  # Sanity check
     5.1 --- a/wok/sup-demo/receip	Sun Feb 26 17:59:31 2017 +0100
     5.2 +++ b/wok/sup-demo/receip	Sun Feb 26 18:52:35 2017 +0100
     5.3 @@ -14,5 +14,5 @@
     5.4  
     5.5  # Here are the optional install rules (download, configure, etc)
     5.6  sup_install() {
     5.7 -	echo "Running sup_install() sequence"
     5.8 +	echo "Hello :-) I'm a demo package!"
     5.9  }