libnetwork.lib: git.create_tarball(): add a warning message when the version passed to the function is not the expected one (that is a string made by the current date in the format YYYYMMDD followed by 'git')

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-10-31 22:01:49 +01:00
parent f107a20bf8
commit 3425fbf7ee
3 changed files with 17 additions and 3 deletions

View File

@ -64,6 +64,11 @@ Changes in version 1.12.6
* pck-update - Davide Madrisan:
Action 3,5: set the package version when calling 'git.download()'.
* lib/libnetwork.lib - Davide Madrisan:
git.create_tarball(): add a warning message when the version passed to the
function is not the expected one (that is a string made by the current
date in the format YYYYMMDD followed by "git").
-------------------------------------------------------------------------------
Changes in version 1.12.5

View File

@ -987,9 +987,15 @@ function git.create_tarball() {
[ "$destdir" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
[ "$pck_version" ] ||
{ pck_version="$(date "+%Y%m%dgit")"
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""; }
local today="$(date "+%Y%m%d")"
if [ "$pck_version" ]; then
[ "$pck_version" = "${today}git" ] || notify.warning "\
${NOTE}${today}git${NORM}: "$"\
not the expected package version"" (${NOTE}${today}git${NORM})..."
else
pck_version="${today}git"
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
fi
which git &>/dev/null ||
notify.error $"utility not found"": \`git'"

View File

@ -88,6 +88,9 @@ msgstr "pacchetto non trovato"
msgid "downloading"
msgstr "download di"
msgid "not the expected package version"
msgstr "non è la versione di pacchetto prevista"
msgid "cloning git repository"
msgstr "clonazione del repository"