sup rev 22
Some small fixes and update POT
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Feb 26 22:38:12 2017 +0100 (2017-02-26) |
parents | a5e4d133589a |
children | 70d029158969 |
files | Makefile README po/clients/fr.po po/clients/sup-clients.pot sup sup-demo/receip |
line diff
1.1 --- a/Makefile Sun Feb 26 21:20:25 2017 +0100 1.2 +++ b/Makefile Sun Feb 26 22:38:12 2017 +0100 1.3 @@ -46,6 +46,7 @@ 1.4 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications 1.5 install -m 0644 data/mime/sup.xml $(DESTDIR)$(PREFIX)/share/mime/packages 1.6 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/sup 1.7 + install -m 0644 README $(DESTDIR)$(PREFIX)/share/sup 1.8 cp -rf sup-demo $(DESTDIR)$(PREFIX)/share/sup 1.9 cp -rf po/clients/mo/* $(DESTDIR)$(PREFIX)/share/locale 1.10
2.1 --- a/README Sun Feb 26 21:20:25 2017 +0100 2.2 +++ b/README Sun Feb 26 22:38:12 2017 +0100 2.3 @@ -1,4 +1,4 @@ 2.4 -SliTaz Users Packages 2.5 +README for SliTaz Users Packages (SUP) 2.6 ================================================================================ 2.7 2.8 CURRENT : cook extract and install work nicely. 2.9 @@ -23,11 +23,12 @@ 2.10 2.11 1) Get source: 2.12 $ hg clone http://hg.slitaz.org/sup 2.13 - 2) Change dir and become root: 2.14 - $ cd sup && su 2.15 - 3) Install clients as root: 2.16 - $ make && make install-clients 2.17 - 4) Play :-) 2.18 + 2.19 + 2) Install SUP Tool: 2.20 + $ cd sup && make 2.21 + $ sudo make install 2.22 + 2.23 + 3) Play :-) 2.24 $ sup help 2.25 2.26 2.27 @@ -74,15 +75,15 @@ 2.28 The goal is to have lightweight packages with every big file downloaded from 2.29 the web. 2.30 2.31 -Sup uses a minimal 'receipt' with a sup_install() function to dl any wanted 2.32 +Sup uses a minimal 'receip' with a sup_install() function to dl any wanted 2.33 files, no pkg size or file list are created when packing. A list of installed 2.34 files is generated at install. 2.35 2.36 -Packages can have a single receipt or a local/ folder with files to install. All 2.37 +Packages can have a single receip or a local/ folder with files to install. All 2.38 downloading and extracting must be done in the cache to build up a list of files 2.39 before installing. The package folder tree should look like this: 2.40 2.41 - * receipt Sup package receipt 2.42 + * receip SUP package receip (receip NOT receipt ;-) 2.43 * README Optional sup package desc/howto 2.44 * files For all installed files 2.45 2.46 @@ -97,8 +98,8 @@ 2.47 2.48 Receipt variables and function 2.49 -------------------------------------------------------------------------------- 2.50 -Here are the variables used or usable in a sup receipt as well as the uniq function. 2.51 -Check out the sup-demo package for a receipt example. 2.52 +Here are the variables used or usable in a sup receip as well as the uniq function. 2.53 +Check out the sup-demo package for a receip example. 2.54 2.55 * $build_date Auto added by 'sup cook' to get the build date 2.56 * $sup_size Auto added by 'sup cook' to get installed size 2.57 @@ -111,7 +112,7 @@ 2.58 packages but warns if dependencies are not installed if DEPENDS is set. 2.59 2.60 Sup packages can be very simple but also very complex, so feel free to use the 2.61 -receipt to warn or prompt users to make an action. 2.62 +receip to warn or prompt users to make an action. 2.63 2.64 2.65 Cook sup packages to be uploaded to the server
3.1 --- a/po/clients/fr.po Sun Feb 26 21:20:25 2017 +0100 3.2 +++ b/po/clients/fr.po Sun Feb 26 22:38:12 2017 +0100 3.3 @@ -7,7 +7,7 @@ 3.4 msgstr "" 3.5 "Project-Id-Version: Sup Clients\n" 3.6 "Report-Msgid-Bugs-To: \n" 3.7 -"POT-Creation-Date: 2017-02-26 21:09+0100\n" 3.8 +"POT-Creation-Date: 2017-02-26 22:08+0100\n" 3.9 "PO-Revision-Date: 2017-02-26 21:15+0100\n" 3.10 "Last-Translator: Christophe Lincoln <pankso@slitaz.org>\n" 3.11 "Language-Team: French\n" 3.12 @@ -40,7 +40,8 @@ 3.13 msgstr "" 3.14 3.15 #: sup:34 3.16 -msgid "Install a sup package" 3.17 +#, fuzzy 3.18 +msgid "Install a new package" 3.19 msgstr "Installe un paquet sup" 3.20 3.21 #: sup:35 3.22 @@ -48,102 +49,106 @@ 3.23 msgstr "Supprime un paquet et ses fichiers" 3.24 3.25 #: sup:36 3.26 +msgid "Create a new package :-)" 3.27 +msgstr "" 3.28 + 3.29 +#: sup:37 3.30 msgid "List installed packages and your wok" 3.31 msgstr "" 3.32 3.33 -#: sup:38 3.34 +#: sup:39 3.35 msgid "Options:" 3.36 msgstr "" 3.37 3.38 -#: sup:39 3.39 +#: sup:40 3.40 msgid "Initialize sup cook environment" 3.41 msgstr "" 3.42 3.43 -#: sup:40 3.44 +#: sup:41 3.45 msgid "Display more output messages" 3.46 msgstr "" 3.47 3.48 -#: sup:92 3.49 +#: sup:60 3.50 +msgid "Missing package name or file path:" 3.51 +msgstr "" 3.52 + 3.53 +#: sup:104 3.54 msgid "Initializing sup cook environment..." 3.55 msgstr "" 3.56 3.57 -#: sup:99 3.58 -msgid "You must specify a package to cook:" 3.59 -msgstr "" 3.60 - 3.61 -#: sup:103 3.62 +#: sup:112 3.63 msgid "Can't find receip in wok for:" 3.64 msgstr "" 3.65 3.66 -#: sup:108 3.67 +#: sup:117 3.68 msgid "Building package:" 3.69 msgstr "" 3.70 3.71 -#: sup:113 3.72 +#: sup:122 3.73 msgid "Checking receip variables..." 3.74 msgstr "" 3.75 3.76 -#: sup:121 sup:126 3.77 +#: sup:130 sup:135 3.78 msgid "Empty variable:" 3.79 msgstr "" 3.80 3.81 -#: sup:127 3.82 +#: sup:136 3.83 msgid "You can use:" 3.84 msgstr "" 3.85 3.86 -#: sup:148 3.87 +#: sup:157 3.88 msgid "Creating compressed archive..." 3.89 msgstr "" 3.90 3.91 -#: sup:155 sup:178 3.92 +#: sup:164 sup:200 3.93 msgid "Packages:" 3.94 msgstr "" 3.95 3.96 -#: sup:165 3.97 -msgid "Missing package file in argument:" 3.98 +#: sup:172 3.99 +msgid "New package name:" 3.100 msgstr "" 3.101 3.102 -#: sup:169 3.103 +#: sup:176 3.104 +msgid "Package already exist in wok:" 3.105 +msgstr "" 3.106 + 3.107 +#: sup:179 3.108 +msgid "Creating new package files and tree..." 3.109 +msgstr "" 3.110 + 3.111 +#: sup:191 3.112 msgid "Can't find package file:" 3.113 msgstr "" 3.114 3.115 -#: sup:173 3.116 +#: sup:195 3.117 msgid "Extract package:" 3.118 msgstr "" 3.119 3.120 -#: sup:186 3.121 -msgid "Missing package name or file in argument:" 3.122 -msgstr "" 3.123 - 3.124 -#: sup:206 3.125 +#: sup:224 3.126 msgid "Can't find sup package:" 3.127 msgstr "" 3.128 3.129 -#: sup:213 3.130 -msgid "Missing package name in argument:" 3.131 -msgstr "" 3.132 - 3.133 -#: sup:220 sup:265 3.134 +#: sup:233 sup:278 3.135 msgid "Can't find installed package:" 3.136 msgstr "" 3.137 3.138 -#: sup:227 3.139 +#: sup:240 3.140 msgid "Installed sup packages:" 3.141 msgstr "" 3.142 3.143 -#: sup:235 3.144 +#: sup:248 3.145 msgid "No sup packages installed" 3.146 msgstr "" 3.147 3.148 -#: sup:239 3.149 +#: sup:252 3.150 msgid "Sup packages in your wok:" 3.151 msgstr "" 3.152 3.153 -#: sup:257 3.154 +#: sup:270 3.155 msgid "Installed package:" 3.156 msgstr "Paquet installé:" 3.157 3.158 -#: sup:261 3.159 +#: sup:274 3.160 msgid "Installed files:" 3.161 msgstr "Fichers installés:" 3.162
4.1 --- a/po/clients/sup-clients.pot Sun Feb 26 21:20:25 2017 +0100 4.2 +++ b/po/clients/sup-clients.pot Sun Feb 26 22:38:12 2017 +0100 4.3 @@ -8,7 +8,7 @@ 4.4 msgstr "" 4.5 "Project-Id-Version: SUP Clients\n" 4.6 "Report-Msgid-Bugs-To: \n" 4.7 -"POT-Creation-Date: 2017-02-26 21:09+0100\n" 4.8 +"POT-Creation-Date: 2017-02-26 22:08+0100\n" 4.9 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 4.10 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 4.11 "Language-Team: LANGUAGE <LL@li.org>\n" 4.12 @@ -38,7 +38,7 @@ 4.13 msgstr "" 4.14 4.15 #: sup:34 4.16 -msgid "Install a sup package" 4.17 +msgid "Install a new package" 4.18 msgstr "" 4.19 4.20 #: sup:35 4.21 @@ -46,102 +46,106 @@ 4.22 msgstr "" 4.23 4.24 #: sup:36 4.25 +msgid "Create a new package :-)" 4.26 +msgstr "" 4.27 + 4.28 +#: sup:37 4.29 msgid "List installed packages and your wok" 4.30 msgstr "" 4.31 4.32 -#: sup:38 4.33 +#: sup:39 4.34 msgid "Options:" 4.35 msgstr "" 4.36 4.37 -#: sup:39 4.38 +#: sup:40 4.39 msgid "Initialize sup cook environment" 4.40 msgstr "" 4.41 4.42 -#: sup:40 4.43 +#: sup:41 4.44 msgid "Display more output messages" 4.45 msgstr "" 4.46 4.47 -#: sup:92 4.48 +#: sup:60 4.49 +msgid "Missing package name or file path:" 4.50 +msgstr "" 4.51 + 4.52 +#: sup:104 4.53 msgid "Initializing sup cook environment..." 4.54 msgstr "" 4.55 4.56 -#: sup:99 4.57 -msgid "You must specify a package to cook:" 4.58 -msgstr "" 4.59 - 4.60 -#: sup:103 4.61 +#: sup:112 4.62 msgid "Can't find receip in wok for:" 4.63 msgstr "" 4.64 4.65 -#: sup:108 4.66 +#: sup:117 4.67 msgid "Building package:" 4.68 msgstr "" 4.69 4.70 -#: sup:113 4.71 +#: sup:122 4.72 msgid "Checking receip variables..." 4.73 msgstr "" 4.74 4.75 -#: sup:121 sup:126 4.76 +#: sup:130 sup:135 4.77 msgid "Empty variable:" 4.78 msgstr "" 4.79 4.80 -#: sup:127 4.81 +#: sup:136 4.82 msgid "You can use:" 4.83 msgstr "" 4.84 4.85 -#: sup:148 4.86 +#: sup:157 4.87 msgid "Creating compressed archive..." 4.88 msgstr "" 4.89 4.90 -#: sup:155 sup:178 4.91 +#: sup:164 sup:200 4.92 msgid "Packages:" 4.93 msgstr "" 4.94 4.95 -#: sup:165 4.96 -msgid "Missing package file in argument:" 4.97 +#: sup:172 4.98 +msgid "New package name:" 4.99 msgstr "" 4.100 4.101 -#: sup:169 4.102 +#: sup:176 4.103 +msgid "Package already exist in wok:" 4.104 +msgstr "" 4.105 + 4.106 +#: sup:179 4.107 +msgid "Creating new package files and tree..." 4.108 +msgstr "" 4.109 + 4.110 +#: sup:191 4.111 msgid "Can't find package file:" 4.112 msgstr "" 4.113 4.114 -#: sup:173 4.115 +#: sup:195 4.116 msgid "Extract package:" 4.117 msgstr "" 4.118 4.119 -#: sup:186 4.120 -msgid "Missing package name or file in argument:" 4.121 -msgstr "" 4.122 - 4.123 -#: sup:206 4.124 +#: sup:224 4.125 msgid "Can't find sup package:" 4.126 msgstr "" 4.127 4.128 -#: sup:213 4.129 -msgid "Missing package name in argument:" 4.130 -msgstr "" 4.131 - 4.132 -#: sup:220 sup:265 4.133 +#: sup:233 sup:278 4.134 msgid "Can't find installed package:" 4.135 msgstr "" 4.136 4.137 -#: sup:227 4.138 +#: sup:240 4.139 msgid "Installed sup packages:" 4.140 msgstr "" 4.141 4.142 -#: sup:235 4.143 +#: sup:248 4.144 msgid "No sup packages installed" 4.145 msgstr "" 4.146 4.147 -#: sup:239 4.148 +#: sup:252 4.149 msgid "Sup packages in your wok:" 4.150 msgstr "" 4.151 4.152 -#: sup:257 4.153 +#: sup:270 4.154 msgid "Installed package:" 4.155 msgstr "" 4.156 4.157 -#: sup:261 4.158 +#: sup:274 4.159 msgid "Installed files:" 4.160 msgstr "" 4.161
5.1 --- a/sup Sun Feb 26 21:20:25 2017 +0100 5.2 +++ b/sup Sun Feb 26 22:38:12 2017 +0100 5.3 @@ -31,14 +31,18 @@ 5.4 $(boldify $(gettext "Commands:")) 5.5 -c cook $(gettext "Cook a package from the wok") 5.6 -e extract $(gettext "Extract a package to current dir") 5.7 - -i install $(gettext "Install a sup package") 5.8 + -i install $(gettext "Install a new package") 5.9 -r remove $(gettext "Remove package files") 5.10 + -n new $(gettext "Create a new package :-)") 5.11 -l list $(gettext "List installed packages and your wok") 5.12 5.13 $(boldify $(gettext "Options:")) 5.14 --init cook $(gettext "Initialize sup cook environment") 5.15 --verbose all $(gettext "Display more output messages") 5.16 5.17 +$(colorize 33 README) /usr/share/sup/README 5.18 +$(colorize 33 Documentation) http://scn.slitaz.org/?d=en/sup 5.19 + 5.20 EOT 5.21 exit 0 5.22 } 5.23 @@ -50,10 +54,18 @@ 5.24 fi 5.25 } 5.26 5.27 -# new_receipt "package" 5.28 +# check_pkg_arg "command" 5.29 +check_pkg_arg() { 5.30 + if [ ! "$pkg" ]; then 5.31 + gettext "Missing package name or file path:" 5.32 + boldify " sup $1 [package|file.sup]" && exit 1 5.33 + fi 5.34 +} 5.35 + 5.36 +# new_receip "package" 5.37 new_receip() { 5.38 - cat > receip << EOT 5.39 -# SliTaz User Package receipt 5.40 + cat > ${wok}/${1}/receip << EOT 5.41 +# SliTaz User Package receip 5.42 5.43 PACKAGE="$1" 5.44 VERSION="" 5.45 @@ -95,10 +107,7 @@ 5.46 fi 5.47 5.48 # Sanity check 5.49 - if [ ! "$pkg" ]; then 5.50 - gettext "You must specify a package to cook:" 5.51 - boldify " sup $1 [package]" && exit 1 5.52 - fi 5.53 + check_pkg_arg "$1" 5.54 if [ ! -f "$receip" ]; then 5.55 gettext "Can't find receip in wok for:" 5.56 colorize 31 " $pkg" && exit 1 5.57 @@ -156,15 +165,28 @@ 5.58 sed -i "/^build_date=/"d ${receip} 5.59 rm -rf ${cache} && newline ;; 5.60 5.61 + -n|new) 5.62 + pkg="$2" 5.63 + newline 5.64 + if [ ! "$pkg" ]; then 5.65 + gettext "New package name:"; echo -n " "; read pkg 5.66 + fi 5.67 + [ ! "$pkg" ] && exit 0 5.68 + if [ -d "$wok/$pkg" ]; then 5.69 + gettext "Package already exist in wok:"; colorize 36 " $pkg" 5.70 + newline && exit 0 5.71 + fi 5.72 + gettext "Creating new package files and tree..." 5.73 + mkdir -p ${wok}/${pkg}/files 5.74 + new_receip "$pkg" 5.75 + status && newline ;; 5.76 + 5.77 -e|extract) 5.78 # Extract package.sup to current dir 5.79 pkg="$2" 5.80 5.81 # Sanity check 5.82 - if [ ! "$pkg" ]; then 5.83 - gettext "Missing package file in argument:" 5.84 - colorize 35 " sup $1 [package.sup]" && exit 1 5.85 - fi 5.86 + check_pkg_arg "$1" 5.87 if [ ! -f "$pkg" ]; then 5.88 gettext "Can't find package file:"; colorize 35 " $pkg" && exit 1 5.89 fi 5.90 @@ -181,11 +203,7 @@ 5.91 -i|install) 5.92 # Download/extract run install() in $cache/install 5.93 pkg="$2" 5.94 - 5.95 - if [ ! "$pkg" ]; then 5.96 - gettext "Missing package name or file in argument:" 5.97 - boldify " sup $1 [package] or [file.sup]" && exit 1 5.98 - fi 5.99 + check_pkg_arg "$1" 5.100 5.101 # Sup pkg in current dir 5.102 if [ -f "$pkg" ]; then 5.103 @@ -208,12 +226,7 @@ 5.104 -r|remove) 5.105 # Remove a package 5.106 pkg="$2" 5.107 - 5.108 - if [ ! "$pkg" ]; then 5.109 - gettext "Missing package name in argument:" 5.110 - boldify " sup $1 [package]" && exit 1 5.111 - fi 5.112 - 5.113 + check_pkg_arg "$1" 5.114 if [ -d "$installed/$pkg" ]; then 5.115 remove_sup "$pkg" 5.116 else