X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/680bcc894b3db63cd9bcd685640c459cbd4343ad..bfe049ff37155fe8d0c7a721e54b15826df5b3e4:/tools/check_dist_archive diff --git a/tools/check_dist_archive b/tools/check_dist_archive index 7937222119..c3c5ae597f 100755 --- a/tools/check_dist_archive +++ b/tools/check_dist_archive @@ -12,24 +12,24 @@ else fi if [ $# -lt 1 -o $# -gt 3 ]; then - cat <&2 <&2 exit 1 fi if [ $# -ge 2 ]; then giturl=$2 - gitbranch=${3:-master} + gitref=${3:-master} else giturl=$(git rev-parse --show-toplevel) - gitbranch=$(git branch | sed -n '/^\*/{s/^..//;p;}') + gitref=HEAD fi tmpdir=$(mktemp -d) @@ -49,7 +49,7 @@ case "$myname" in esac if [ ! -r "$exclude" ]; then - printf 'File not found: %s\n' "$exclude" + printf 'File not found: %s\n' "$exclude" >&2 exit 1 fi @@ -60,8 +60,8 @@ tar --directory "$tmpdir" \ --transform 's!^[^/]*!a!' \ --extract --gunzip --file "$archive" -echo "Copying git repository: $giturl/$gitbranch -> $git_dir" -git archive --format=tar --prefix="b/" --remote="$giturl" "$gitbranch" \ +echo "Copying git repository: $giturl/$gitref -> $git_dir" +git archive --format=tar --prefix="b/" --remote="$giturl" "$gitref" \ | tar --directory "$tmpdir" --extract --file - fa=from_tgz @@ -86,12 +86,18 @@ diffcmd() { echo "The archive looks good." else status=1 - echo "Some files are missing and/or unexpected in the archive." + cat <