Skip to content

Commit

Permalink
Merge pull request #13 from bertsky/bash-from-env
Browse files Browse the repository at this point in the history
use bash from env instead of fixed path, check version
  • Loading branch information
bertsky authored Feb 20, 2020
2 parents 8a907a6 + d3eee43 commit 31eb2ae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ Change Log
==========
Versioned according to [Semantic Versioning](http://semver.org/).

## Unreleased

## 0.0.3

Changed:

- Use bash from env instead of fixed shebang
- Ensure minimum bash version


## 0.0.2

First release
Expand Down
5 changes: 3 additions & 2 deletions ocrd-im6convert
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash
#!/usr/bin/env bash
# shellcheck disable=SC2086

set -eu
set -o pipefail

which ocrd >/dev/null 2>/dev/null || { echo "ocrd not in \$PATH. Panicking"; exit 1; }
which ocrd >/dev/null 2>/dev/null || { echo >&2 "ocrd not in \$PATH. Panicking"; exit 1; }
((BASH_VERSINFO<4 || BASH_VERSINFO==4 && BASH_VERSINFO[1]<4)) && echo >&2 "bash $BASH_VERSION is too old. Please install bash 4.4 or newer." && exit 1

SHAREDIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"

Expand Down
2 changes: 1 addition & 1 deletion ocrd-tool.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"git_url": "https://github.com/OCR-D/ocrd_im6convert",
"version": "0.0.2",
"version": "0.0.3",
"tools": {

"ocrd-im6convert": {
Expand Down

0 comments on commit 31eb2ae

Please sign in to comment.