diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/devtools/commit-script-check.sh | 33 | ||||
-rw-r--r-- | contrib/rpm/README.md | 2 | ||||
-rw-r--r-- | contrib/rpm/bitcoin.if | 2 | ||||
-rw-r--r-- | contrib/verifybinaries/README.md | 8 | ||||
-rwxr-xr-x | contrib/verifybinaries/verify.sh | 43 |
5 files changed, 68 insertions, 20 deletions
diff --git a/contrib/devtools/commit-script-check.sh b/contrib/devtools/commit-script-check.sh index add4bb4883..1c9dbc7f68 100755 --- a/contrib/devtools/commit-script-check.sh +++ b/contrib/devtools/commit-script-check.sh @@ -20,20 +20,27 @@ RET=0 PREV_BRANCH=`git name-rev --name-only HEAD` PREV_HEAD=`git rev-parse HEAD` for i in `git rev-list --reverse $1`; do - git rev-list -n 1 --pretty="%s" $i | grep -q "^scripted-diff:" || continue - git checkout --quiet $i^ || exit - SCRIPT="`git rev-list --format=%b -n1 $i | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d'`" - if test "x$SCRIPT" = "x"; then - echo "Error: missing script for: $i" - echo "Failed" - RET=1 - else - echo "Running script for: $i" - echo "$SCRIPT" - eval "$SCRIPT" - git --no-pager diff --exit-code $i && echo "OK" || (echo "Failed"; false) || RET=1 + if git rev-list -n 1 --pretty="%s" $i | grep -q "^scripted-diff:"; then + git checkout --quiet $i^ || exit + SCRIPT="`git rev-list --format=%b -n1 $i | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d'`" + if test "x$SCRIPT" = "x"; then + echo "Error: missing script for: $i" + echo "Failed" + RET=1 + else + echo "Running script for: $i" + echo "$SCRIPT" + eval "$SCRIPT" + git --no-pager diff --exit-code $i && echo "OK" || (echo "Failed"; false) || RET=1 + fi + git reset --quiet --hard HEAD + else + if git rev-list "--format=%b" -n1 $i | grep -q '^-\(BEGIN\|END\)[ a-zA-Z]*-$'; then + echo "Error: script block marker but no scripted-diff in title" + echo "Failed" + RET=1 + fi fi - git reset --quiet --hard HEAD done git checkout --quiet $PREV_BRANCH 2>/dev/null || git checkout --quiet $PREV_HEAD exit $RET diff --git a/contrib/rpm/README.md b/contrib/rpm/README.md index e1fd0b317b..4ab2f35680 100644 --- a/contrib/rpm/README.md +++ b/contrib/rpm/README.md @@ -181,5 +181,5 @@ knows what they are getting when installing the GUI package. As far as minor differences, I generally prefer to assign the file permissions in the `%files` portion of an RPM spec file rather than specifying the -permissions of a file during `%install` and other minor things like that that +permissions of a file during `%install` and other minor things like that are largely just cosmetic. diff --git a/contrib/rpm/bitcoin.if b/contrib/rpm/bitcoin.if index 2b096c24dc..b206866cc5 100644 --- a/contrib/rpm/bitcoin.if +++ b/contrib/rpm/bitcoin.if @@ -121,7 +121,7 @@ interface(`bitcoin_manage_lib_dirs',` ######################################## ## <summary> ## All of the rules required to administrate -## an bitcoin environment +## a bitcoin environment ## </summary> ## <param name="domain"> ## <summary> diff --git a/contrib/verifybinaries/README.md b/contrib/verifybinaries/README.md index ed3e14fb6c..3ffe0a2f28 100644 --- a/contrib/verifybinaries/README.md +++ b/contrib/verifybinaries/README.md @@ -26,6 +26,14 @@ The script returns 0 if everything passes the checks. It returns 1 if either the ./verify.sh bitcoin-core-0.13.0-rc3 ``` +If you only want to download the binaries of certain platform, add the corresponding suffix, e.g.: + +```sh +./verify.sh bitcoin-core-0.11.2-osx +./verify.sh 0.12.0-linux +./verify.sh bitcoin-core-0.13.0-rc3-win64 +``` + If you do not want to keep the downloaded binaries, specify anything as the second parameter. ```sh diff --git a/contrib/verifybinaries/verify.sh b/contrib/verifybinaries/verify.sh index e20770c96a..c2cc2b7013 100755 --- a/contrib/verifybinaries/verify.sh +++ b/contrib/verifybinaries/verify.sh @@ -42,13 +42,36 @@ if [ -n "$1" ]; then VERSION="$VERSIONPREFIX$1" fi - #now let's see if the version string contains "rc", and strip it off if it does - # and simultaneously add RCSUBDIR to BASEDIR, where we will look for SIGNATUREFILENAME - if [[ $VERSION == *"$RCVERSIONSTRING"* ]]; then - BASEDIR="$BASEDIR${VERSION/%-$RCVERSIONSTRING*}/" - BASEDIR="$BASEDIR$RCSUBDIR.$RCVERSIONSTRING${VERSION: -1}/" + STRIPPEDLAST="${VERSION%-*}" + + #now let's see if the version string contains "rc" or a platform name (e.g. "osx") + if [[ "$STRIPPEDLAST-" == "$VERSIONPREFIX" ]]; then + BASEDIR="$BASEDIR$VERSION/" else + # let's examine the last part to see if it's rc and/or platform name + STRIPPEDNEXTTOLAST="${STRIPPEDLAST%-*}" + if [[ "$STRIPPEDNEXTTOLAST-" == "$VERSIONPREFIX" ]]; then + + LASTSUFFIX="${VERSION##*-}" + VERSION="$STRIPPEDLAST" + + if [[ $LASTSUFFIX == *"$RCVERSIONSTRING"* ]]; then + RCVERSION="$LASTSUFFIX" + else + PLATFORM="$LASTSUFFIX" + fi + + else + RCVERSION="${STRIPPEDLAST##*-}" + PLATFORM="${VERSION##*-}" + + VERSION="$STRIPPEDNEXTTOLAST" + fi + BASEDIR="$BASEDIR$VERSION/" + if [[ $RCVERSION == *"$RCVERSIONSTRING"* ]]; then + BASEDIR="$BASEDIR$RCSUBDIR.$RCVERSION/" + fi fi SIGNATUREFILE="$BASEDIR$SIGNATUREFILENAME" @@ -92,12 +115,22 @@ if [ $RET -ne 0 ]; then exit "$RET" fi +if [ -n "$PLATFORM" ]; then + grep $PLATFORM $TMPFILE > "$TMPFILE-plat" + TMPFILESIZE=$(stat -c%s "$TMPFILE-plat") + if [ $TMPFILESIZE -eq 0 ]; then + echo "error: no files matched the platform specified" && exit 3 + fi + mv "$TMPFILE-plat" $TMPFILE +fi + #here we extract the filenames from the signature file FILES=$(awk '{print $2}' "$TMPFILE") #and download these one by one for file in $FILES do + echo "Downloading $file" wget --quiet -N "$BASEDIR$file" done |