install sharness

This commit is contained in:
Juan Batiz-Benet 2014-11-06 15:37:38 -08:00
parent 350b8333b3
commit 9535cb5802
2 changed files with 35 additions and 1 deletions

View File

@ -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
View 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