[commit: ghc] master: Change all hashbangs to /usr/bin/env (#9057) (d5e4874)
git at git.haskell.org
git at git.haskell.org
Tue Sep 23 13:45:43 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d5e4874833054f1789289c433be292ae3e9bd7d0/ghc
>---------------------------------------------------------------
commit d5e4874833054f1789289c433be292ae3e9bd7d0
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Tue Sep 23 08:45:31 2014 -0500
Change all hashbangs to /usr/bin/env (#9057)
Summary:
```
git grep -l '#!' | xargs sed -i 's|#!.*/bin/\([^ ]*\)$|#!/usr/bin/env \1|'
```
and some manual tweaking
Test Plan: harbormaster
Reviewers: austin
Subscribers: hvr, simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D237
GHC Trac Issues: #9057
>---------------------------------------------------------------
d5e4874833054f1789289c433be292ae3e9bd7d0
compiler/count_bytes | 2 +-
distrib/cross-port | 2 +-
testsuite/tests/rename/prog006/Setup.lhs | 2 +-
utils/count_lines/count_lines.lprl | 2 +-
utils/runghc/runghc.hs | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/compiler/count_bytes b/compiler/count_bytes
index bf62402..4b8aa37 100644
--- a/compiler/count_bytes
+++ b/compiler/count_bytes
@@ -1,4 +1,4 @@
-#! /usr/local/bin/perl
+#!/usr/bin/env perl
#
%DirCount = ();
%ModCount = ();
diff --git a/distrib/cross-port b/distrib/cross-port
index 690e60b..7c54604 100644
--- a/distrib/cross-port
+++ b/distrib/cross-port
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/usr/bin/env bash
# This script can be used to generate some unregisterised .hc files
# for bootstrapping GHC on a new/unsupported platform. It involves a
diff --git a/testsuite/tests/rename/prog006/Setup.lhs b/testsuite/tests/rename/prog006/Setup.lhs
index b28a823..a81e9d2 100644
--- a/testsuite/tests/rename/prog006/Setup.lhs
+++ b/testsuite/tests/rename/prog006/Setup.lhs
@@ -1,4 +1,4 @@
-#!/usr/bin/runhaskell
+#!/usr/bin/env runhaskell
> module Main where
> import Distribution.Simple
> main :: IO ()
diff --git a/utils/count_lines/count_lines.lprl b/utils/count_lines/count_lines.lprl
index 72b4413..49b11ee 100644
--- a/utils/count_lines/count_lines.lprl
+++ b/utils/count_lines/count_lines.lprl
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#!/usr/bin/env perl
\begin{code}
diff --git a/utils/runghc/runghc.hs b/utils/runghc/runghc.hs
index e94c550..42ddb83 100644
--- a/utils/runghc/runghc.hs
+++ b/utils/runghc/runghc.hs
@@ -7,7 +7,7 @@
-- runghc program, for invoking from a #! line in a script. For example:
--
-- script.lhs:
--- #!/usr/bin/env /usr/bin/runghc
+-- #!/usr/bin/env runghc
-- > main = putStrLn "hello!"
--
-- runghc accepts one flag:
More information about the ghc-commits
mailing list