[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Best VCS layout for our packages?



Hi,

>> #!/bin/bash -eu



I do not know where it does come from, but why people still use bash instead of sh?

>I much prefer moving the -eu to from shebang 'set -eu', since that works
>even when someone calls the script via 'bash -x'. The shebang options
>take effect only when some calls the script directly, not via bash.


+1

I did some "bin/bash" search on that git repo

bare-united/p (master) $ grep bash . -R |grep -v changelog |grep -v completion
./xmonad/debian/xmonad-session:#!/bin/bash

./xmonad-contrib/debian/find-copyrights.sh:#!/bin/bash

they can be replaced with #!/bin/sh


./ghc/debian/rules:GHC=$(firstword $(shell bash -c "type -p ghc"))

this is something really obscure to me... why can't we just do
"GHC=$(which ghc)"


sorry I didn't spot it before :)


./haskell-hoogle/debian/tests/void:#!/bin/bash
./haskell-hoogle/debian/tests/install-remove:#!/bin/bash
./haskell-yesod-bin/debian/tests/scaffold:#!/bin/bash


they all seems to be replaceable


As you know bash is trying to be removed from essential packages, moreover there is no need
to force it when not necessary, specially because bin/sh defaults to dash.

I might be wrong there, maybe some script uses some bashism and they can't run with dash, but
AFAICS the code is standard :)

cheers,

G.


Reply to: