Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
ghcup
Commits
61a5e179
Verified
Commit
61a5e179
authored
5 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
Make installation via bootstrap-haskell easier
Fixes
#113
parent
077ed765
No related branches found
No related tags found
1 merge request
!114
Make installation via bootstrap-haskell easier
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bootstrap-haskell
+27
-9
27 additions, 9 deletions
bootstrap-haskell
with
27 additions
and
9 deletions
bootstrap-haskell
+
27
−
9
View file @
61a5e179
...
@@ -32,8 +32,8 @@ echo "PATH components."
...
@@ -32,8 +32,8 @@ echo "PATH components."
echo
echo
if
[
-z
"
${
BOOTSTRAP_HASKELL_NONINTERACTIVE
}
"
]
;
then
if
[
-z
"
${
BOOTSTRAP_HASKELL_NONINTERACTIVE
}
"
]
;
then
echo
"To proceed with the ghcup installation press
enter
, to cancel press ctrl-c."
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"To proceed with the ghcup installation press
ENTER
, to cancel press ctrl-c."
echo
"Note that this script can be re-run at any given time."
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"Note that this script can be re-run at any given time."
echo
echo
# Wait for user input to continue.
# Wait for user input to continue.
# shellcheck disable=SC2034
# shellcheck disable=SC2034
...
@@ -58,14 +58,13 @@ else
...
@@ -58,14 +58,13 @@ else
fi
fi
echo
echo
echo
"To install and run GHC you need the following dependencies:"
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"To install and run GHC you need the following dependencies:"
echo
"
$(
ghcup print-system-reqs
)
"
echo
"
$(
ghcup print-system-reqs
)
"
echo
echo
if
[
-z
"
${
BOOTSTRAP_HASKELL_NONINTERACTIVE
}
"
]
;
then
if
[
-z
"
${
BOOTSTRAP_HASKELL_NONINTERACTIVE
}
"
]
;
then
echo
"You may want to install these now, then press enter to proceed"
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"You may want to install these now, then press ENTER to proceed"
echo
"or press ctrl-c to abort."
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"or press ctrl-c to abort. Installation may take a while."
echo
"Installation may take a while."
echo
echo
# Wait for user input to continue.
# Wait for user input to continue.
...
@@ -83,9 +82,28 @@ edo cabal new-update
...
@@ -83,9 +82,28 @@ edo cabal new-update
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
""
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
""
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"Installation done!"
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"Installation done!"
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
""
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
""
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"Don't forget to source
$GHCUP_INSTALL_BASE_PREFIX
/.ghcup/env in your ~/.bashrc or similar."
echo
"In order to run ghc and cabal, you need to adjust your PATH variable."
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
""
echo
"You may want to source '
$GHCUP_INSTALL_BASE_PREFIX
/.ghcup/env' in your shell"
echo
"configuration to do so (e.g. ~/.bashrc)."
if
[
-e
"
$HOME
/.bashrc"
]
;
then
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
""
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"Detected ~/.bashrc on your system..."
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"If you want ghcup to automatically fix your ~/.bashrc to include the required PATH variable"
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"answer with YES and press ENTER (at your own risk)."
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
"Otherwise press ctrl-c to abort."
printf
"
\\
033[0;35m%s
\\
033[0m
\\
n"
""
read
-r
next_answer </dev/tty
case
$next_answer
in
[
Yy]
*
)
echo
"source
$GHCUP_INSTALL_BASE_PREFIX
/.ghcup/env"
>>
"
${
HOME
}
/.bashrc"
;;
*
)
exit
0
;;
esac
fi
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment