mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-26 04:47:45 +08:00
install sharness
This commit is contained in:
parent
350b8333b3
commit
9535cb5802
@ -6,7 +6,7 @@
|
||||
|
||||
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
|
||||
|
||||
all: clean $(T) aggregate
|
||||
all: clean deps $(T) aggregate
|
||||
|
||||
clean:
|
||||
@echo "*** $@ ***"
|
||||
@ -20,4 +20,10 @@ aggregate:
|
||||
@echo "*** $@ ***"
|
||||
./test-aggregate-results.sh
|
||||
|
||||
deps: sharness.sh
|
||||
|
||||
sharness.sh:
|
||||
@echo "*** installing $@ ***"
|
||||
./install-sharness.sh
|
||||
|
||||
.PHONY: all clean $(T) aggregate
|
||||
|
||||
28
test/install-sharness.sh
Executable file
28
test/install-sharness.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
# install sharness.sh
|
||||
#
|
||||
# Copyright (c) 2014 Juan Batiz-Benet
|
||||
# MIT Licensed; see the LICENSE file in this repository.
|
||||
#
|
||||
|
||||
# settings
|
||||
version=50229a79ba22b2f13ccd82451d86570fecbd194c
|
||||
hash1=eeaf96630fc25ec58fb678b64ef9772d5eb92f64
|
||||
url=https://raw.githubusercontent.com/mlafeldt/sharness/$version/sharness.sh
|
||||
file=sharness.sh
|
||||
|
||||
# download it
|
||||
wget -q $url -O $file.test
|
||||
|
||||
# verify it's the right file
|
||||
hash2=`cat $file.test | shasum | cut -c1-40`
|
||||
if test "$hash1" != "$hash2"; then
|
||||
echo "$file verification failed"
|
||||
echo "$hash1 != $hash2"
|
||||
rm $file.test
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# ok, move it into place
|
||||
mv $file.test $file
|
||||
exit 0
|
||||
Loading…
Reference in New Issue
Block a user