App-perlbrew icon indicating copy to clipboard operation
App-perlbrew copied to clipboard

(PATCH) Install script says it needs /bin/sh but actually requires bash

Open jimav opened this issue 8 years ago • 1 comments

The install script at http://install.perlbrew.pl starts with #!/bin/sh but actually requires bash. It could start with #!/usr/bin/env bash However, there is no good reason to require bash, so the following patch makes the install script work using /bin/sh. BTW, the script contains no version info; this patch is against what was downloaded on 5/16/2016:

--- index.html 2016-05-17 01:13:06.860722448 +0000 +++ index.html.NEW 2016-05-17 01:44:53.409322430 +0000 @@ -1,10 +1,12 @@ #!/bin/sh

-if [ "x${PERLBREWURL}" == "x" ]; then +set -e -u # die if something fails or an undef variable referenced + +if [ "x${PERLBREWURL:-}" = "x" ]; then PERLBREWURL=https://raw.githubusercontent.com/gugod/App-perlbrew/master/perlbrew fi

-if [ -z "$TMPDIR" ]; then +if [ -z "${TMPDIR:-}" ]; then if [ -d "/tmp" ]; then TMPDIR="/tmp" else

jimav avatar May 17 '16 01:05 jimav