sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

bashisms in extcode-4.1.2/pari/dokchitser/testall #7243

Closed timabbott closed 14 years ago

timabbott commented 15 years ago

In the extcode spkg, pari/dokchitser/testall uses bashisms but has a /bin/sh #! line:

!/bin/sh

echo " r ex-bsw" | sage -gp echo " r ex-chgen" | sage -gp

We should change the #! line to

!/bin/bash

CC: david.kirkby@onetel.net @mwhansen

Component: porting

Author: Tim Abbott, Mike Hansen

Reviewer: David Kirkby

Merged: sage-4.3.rc1

Issue created by migration from https://trac.sagemath.org/ticket/7243

mwhansen commented 15 years ago

Attachment: trac_7243.patch.gz

mwhansen commented 15 years ago

Author: Tim Abbott, Mike Hansen

bac7d3ea-3f1b-4826-8464-f0b53d5e12d2 commented 14 years ago
comment:2

I think the


#!/usr/bin/env bash

(from memory, so might not be right)

is better, as bash is not always installed in /bin

bash-2.04$ uname -a
HP-UX hpbox B.11.11 U 9000/785 2016698240 unlimited-user license
bash-2.04$ ls /bin/bash
/bin/bash not found
bash-2.04$ which bash
/opt/OpenSource/bin/bash
bash-2.04$ which env
/usr/bin/env
bash-2.04$
timabbott commented 14 years ago
comment:3

Yeah, using '#!/usr/bin/env bash' should be correct.

timabbott commented 14 years ago

Attachment: trac_7243.patch.v2.gz

timabbott commented 14 years ago
comment:4

I posted a new patch reflecting that change.

bac7d3ea-3f1b-4826-8464-f0b53d5e12d2 commented 14 years ago
comment:5

That looks safe and reliable to me, so I'll set this to 'needs review' then set it to 'positive'.

Dave

bac7d3ea-3f1b-4826-8464-f0b53d5e12d2 commented 14 years ago

Reviewer: drkirkby

mwhansen commented 14 years ago

Changed reviewer from drkirkby to David Kirkby

mwhansen commented 14 years ago

Merged: sage-4.3.rc1