chiark / gitweb /
Do not crash if --upload-yarrg is specified but not --upload-pctb
[ypp-sc-tools.db-test.git] / yarrg / Commods.pm
index 860510e33835e5e1e574ab429862f0563ecf7c2a..4d988db4ae7e28b854eac40330b9ecd4d84ebfbe 100644 (file)
@@ -178,7 +178,7 @@ sub parse_info1 ($$) {
 sub parse_info_clientside () {
     my $yarrg= $ENV{'YPPSC_YARRG_DICT_UPDATE'};
     return unless $yarrg;
-    my $master= fetch_with_rsync("info-$masterinfoversion");
+    my $master= fetch_with_rsync("info-v$masterinfoversion");
     parse_info1($master,'s');
     my $local= '_local-info.txt';
     if (stat $local) {
@@ -251,7 +251,14 @@ sub get_our_version ($$) {
     $aref->{"${prefix}name"}= 'ypp-sc-tools yarrg';
     $aref->{"${prefix}fixes"}= 'lastpage checkpager';
 
-    my $version= `git-describe --tags HEAD || echo 0unknown`; $? and die $?;
+    my $version= `
+       if type -p git-describe >/dev/null 2>&1; then
+               gd=git-describe
+       else
+               gd="git describe"
+       fi
+       \$gd --tags HEAD || echo 0unknown
+    `; $? and die $?;
     chomp($version);
     $aref->{"${prefix}version"}= $version;
     return $aref;