A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test that the hosts get the cluster's properties
[simgrid.git]
/
tools
/
check_dist_archive
diff --git
a/tools/check_dist_archive
b/tools/check_dist_archive
index
53b1d1f
..
963a4a3
100755
(executable)
--- a/
tools/check_dist_archive
+++ b/
tools/check_dist_archive
@@
-1,5
+1,11
@@
#!/bin/bash
#!/bin/bash
+# Copyright (c) 2013-2014. The SimGrid Team.
+# All rights reserved.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the license (GNU LGPL) which comes with this package.
+
set -e
if [ "$1" = "-batch" ]; then
set -e
if [ "$1" = "-batch" ]; then
@@
-12,24
+18,24
@@
else
fi
if [ $# -lt 1 -o $# -gt 3 ]; then
fi
if [ $# -lt 1 -o $# -gt 3 ]; then
- cat <<EOF
-Usage: $0 [-batch] archive.tar.gz [git_url [git_
branch
]]
+ cat
>&2
<<EOF
+Usage: $0 [-batch] archive.tar.gz [git_url [git_
reference
]]
EOF
exit 1
fi
archive=$1
if [ ! -r "$archive" ]; then
EOF
exit 1
fi
archive=$1
if [ ! -r "$archive" ]; then
- printf 'File not found: %s\n' "$archive"
+ printf 'File not found: %s\n' "$archive"
>&2
exit 1
fi
if [ $# -ge 2 ]; then
giturl=$2
exit 1
fi
if [ $# -ge 2 ]; then
giturl=$2
- git
branch
=${3:-master}
+ git
ref
=${3:-master}
else
giturl=$(git rev-parse --show-toplevel)
else
giturl=$(git rev-parse --show-toplevel)
- git
branch=$(git branch | sed -n '/^\*/{s/^..//;p;}')
+ git
ref=HEAD
fi
tmpdir=$(mktemp -d)
fi
tmpdir=$(mktemp -d)
@@
-49,7
+55,7
@@
case "$myname" in
esac
if [ ! -r "$exclude" ]; then
esac
if [ ! -r "$exclude" ]; then
- printf 'File not found: %s\n' "$exclude"
+ printf 'File not found: %s\n' "$exclude"
>&2
exit 1
fi
exit 1
fi
@@
-60,8
+66,8
@@
tar --directory "$tmpdir" \
--transform 's!^[^/]*!a!' \
--extract --gunzip --file "$archive"
--transform 's!^[^/]*!a!' \
--extract --gunzip --file "$archive"
-echo "Copying git repository: $giturl/$git
branch
-> $git_dir"
-git archive --format=tar --prefix="b/" --remote="$giturl" "$git
branch
" \
+echo "Copying git repository: $giturl/$git
ref
-> $git_dir"
+git archive --format=tar --prefix="b/" --remote="$giturl" "$git
ref
" \
| tar --directory "$tmpdir" --extract --file -
fa=from_tgz
| tar --directory "$tmpdir" --extract --file -
fa=from_tgz
@@
-97,7
+103,7
@@
EOF
fi
}
fi
}
-colordiff=$(type -p colordiff
)
+colordiff=$(type -p colordiff
|| true)
colorless() {
if [ -x "$colordiff" ]; then
"$colordiff" | less -R -F -X
colorless() {
if [ -x "$colordiff" ]; then
"$colordiff" | less -R -F -X