dist: tools: git-cache: bump version
adds OSX fixes for md5sum, flock
This commit is contained in:
parent
51d13ee906
commit
17b35f6ece
17
dist/tools/git/git-cache
vendored
17
dist/tools/git/git-cache
vendored
@ -40,6 +40,20 @@ _add() {
|
||||
set +e
|
||||
}
|
||||
|
||||
if [ "$(uname)" = Darwin ]; then
|
||||
_locked() {
|
||||
local lockfile="$1"
|
||||
shift
|
||||
|
||||
while ! shlock -p $$ -f $lockfile; do
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
$*
|
||||
|
||||
rm $lockfile
|
||||
}
|
||||
else
|
||||
_locked() {
|
||||
local lockfile="$1"
|
||||
shift
|
||||
@ -49,6 +63,7 @@ _locked() {
|
||||
$*
|
||||
) 9>"$lockfile"
|
||||
}
|
||||
fi
|
||||
|
||||
update() {
|
||||
set -e
|
||||
@ -108,7 +123,7 @@ _check_commit() {
|
||||
}
|
||||
|
||||
_remote_name() {
|
||||
echo "$*" | md5sum | cut -d\ -f1
|
||||
echo "$*" | git hash-object --stdin
|
||||
}
|
||||
|
||||
_tag_to_sha1() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user