[commit: ghc] master: driver: Fix usage of '$0' in ghcii.sh (#8873) (8240312)
git at git.haskell.org
git at git.haskell.org
Mon Jul 28 14:38:01 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8240312ae37a4a1cb89adf13289ac48d7e2aa1d8/ghc
>---------------------------------------------------------------
commit 8240312ae37a4a1cb89adf13289ac48d7e2aa1d8
Author: Austin Seipp <austin at well-typed.com>
Date: Mon Jul 28 07:53:32 2014 -0500
driver: Fix usage of '$0' in ghcii.sh (#8873)
Signed-off-by: Austin Seipp <austin at well-typed.com>
>---------------------------------------------------------------
8240312ae37a4a1cb89adf13289ac48d7e2aa1d8
driver/ghci/ghc.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/driver/ghci/ghc.mk b/driver/ghci/ghc.mk
index 4c5c09e..ba6984c 100644
--- a/driver/ghci/ghc.mk
+++ b/driver/ghci/ghc.mk
@@ -22,7 +22,7 @@ install_driver_ghci:
$(call removeFiles, "$(WRAPPER)")
$(CREATE_SCRIPT) "$(WRAPPER)"
echo '#!$(SHELL)' >> "$(WRAPPER)"
- echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive $${1+"$$@"}' >> "$(WRAPPER)"
+ echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
$(EXECUTABLE_FILE) "$(WRAPPER)"
$(call removeFiles,"$(DESTDIR)$(bindir)/ghci")
$(LN_S) ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghci"
@@ -57,7 +57,7 @@ install_driver_ghcii:
$(call INSTALL_DIR,$(DESTDIR)$(bindir))
$(call removeFiles,"$(GHCII_SCRIPT)")
echo "#!$(SHELL)" >> $(GHCII_SCRIPT)
- echo 'exec "$$0"/../ghc --interactive $${1+"$$@"}' >> $(GHCII_SCRIPT)
+ echo 'exec "$$(dirname "$$0")"/ghc --interactive "$$@"' >> $(GHCII_SCRIPT)
$(EXECUTABLE_FILE) $(GHCII_SCRIPT)
cp $(GHCII_SCRIPT) $(GHCII_SCRIPT_VERSIONED)
$(EXECUTABLE_FILE) $(GHCII_SCRIPT_VERSIONED)
More information about the ghc-commits
mailing list