Skip to content

Commit

Permalink
Merge branch 'release/0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Jan 16, 2024
2 parents 4f6ce09 + 7f1bcb1 commit a3eb143
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL=bash
VERSION=0.7.0
OLD_VERSION=0.6.0
VERSION=0.7.1
OLD_VERSION=0.7.0

check: check-cli
(cd bash; make check)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ The **[port4me]** tool:

* requires no configuration

* is implemented in Bash, Python, and R

* can be reproduced perfectly on all operating systems and in all
common programming languages

* Available for Bash, Python, and R


## Introduction

Expand Down Expand Up @@ -321,7 +321,7 @@ error (stderr), which can be seen in the terminal. For example,
To install the Bash version of **portme**, do:

```sh
VERSION=0.7.0
VERSION=0.7.1
curl -L -O https://github.com/HenrikBengtsson/port4me/archive/refs/tags/"${VERSION}.tar.gz"
tar -x -f "${VERSION}.tar.gz"
export PREFIX=/path/to/port4me/ ## must be an absolute path to a folder
Expand All @@ -333,7 +333,7 @@ Then run it as:
```sh
$ export PATH=/path/to/port4me/bin:$PATH
$ port4me --version
0.7.0
0.7.1
```

### R package
Expand Down
8 changes: 8 additions & 0 deletions bash/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 0.7.1 [2024-01-16]

## Bug Fixes

* `port4me` could generate error `port4me.bash: line 275: 3: Bad file
descriptor`. This was due to left-over debugging code.


# Version 0.7.0 [2024-01-15]

## Significant Changes
Expand Down
6 changes: 3 additions & 3 deletions bash/incl/port4me.bash
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' Requirements:
#' * Bash (>= 4)
#'
#' Version: 0.7.0
#' Version: 0.7.1
#' Copyright: Henrik Bengtsson (2022-2024)
#' License: MIT
#' Source code: https://github.com/HenrikBengtsson/port4me
Expand Down Expand Up @@ -293,11 +293,11 @@ _p4m_lcg_port() {
has_subset=true
fi

if ${PORT4ME_DEBUG}; then
if ${PORT4ME_DEBUG:-false}; then
{
echo "(min,max): ($min,$max)"
echo "subset: [n=${#subset[@]}]"
} >&3
}
fi

## Sample values in [0,m-2] (sic!), but reject until in [min,max],
Expand Down
8 changes: 5 additions & 3 deletions bash/port4me
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#' Requirements:
#' * Bash (>= 4)
#'
#' Version: 0.7.0
#' Version: {{ version }}
#' Copyright: Henrik Bengtsson (2022-2024)
#' License: MIT

Expand All @@ -61,14 +61,16 @@ source "${incl}/port4me.bash"
# CLI utility functions
# -------------------------------------------------------------------------
function _p4me_version {
grep -E "^#'[ ]*Version:[ ]*" "$0" | sed "s/#'[ ]*Version:[ ]*//g"
local version
version=$(grep -E "^#'[ ]*Version:[ ]*" "${incl}/port4me.bash" | sed "s/#'[ ]*Version:[ ]*//g")
echo "${version}"
}

function _p4me_help {
local what res

what=$1
res=$(grep "^#'" "$0" | cut -b 4-)
res=$(grep "^#'" "$0" | cut -b 4- | sed -E "s/[{][{] version [}][}]/$(_p4me_version)/")

if [[ $what == "full" ]]; then
res=$(echo "$res" | sed '/^---/d')
Expand Down

0 comments on commit a3eb143

Please sign in to comment.