Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 80703d7b29 | |||
| 942685f396 | |||
| 02744ff4a0 | |||
| d0538a50e0 | |||
| 318ac21e41 | |||
| 3e9bb7c369 | |||
| 2c64cd0f02 | |||
| 59e6b65249 | |||
| 91ef2c7666 | |||
| 935cb5541b | |||
| 9a7eb11c73 | |||
| 3e9746cf0c |
2
.github/workflows/docker.yaml
vendored
2
.github/workflows/docker.yaml
vendored
@@ -57,6 +57,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: docker://arm64v8/ubuntu:focal
|
- uses: docker://arm64v8/ubuntu:focal
|
||||||
name: Cleanup (aarch64 linux)
|
name: Cleanup (aarch64 linux)
|
||||||
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
||||||
|
|
||||||
@@ -93,6 +94,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: docker://arm64v8/ubuntu:focal
|
- uses: docker://arm64v8/ubuntu:focal
|
||||||
name: Cleanup (aarch64 linux)
|
name: Cleanup (aarch64 linux)
|
||||||
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -105,6 +105,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: docker://arm64v8/debian:10
|
- uses: docker://arm64v8/debian:10
|
||||||
name: Cleanup (aarch64 linux)
|
name: Cleanup (aarch64 linux)
|
||||||
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
||||||
|
|
||||||
@@ -348,6 +349,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: docker://arm64v8/debian:10
|
- uses: docker://arm64v8/debian:10
|
||||||
name: Cleanup (aarch64 linux)
|
name: Cleanup (aarch64 linux)
|
||||||
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
{-# LANGUAGE BangPatterns #-}
|
{-# LANGUAGE BangPatterns #-}
|
||||||
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
|
|
||||||
module BrickMain where
|
module BrickMain where
|
||||||
|
|
||||||
@@ -202,34 +203,35 @@ handleGenericListEvent (VtyEvent ev) = do
|
|||||||
handleGenericListEvent _ = pure ()
|
handleGenericListEvent _ = pure ()
|
||||||
|
|
||||||
-- This re-uses Brick.Widget.List.renderList
|
-- This re-uses Brick.Widget.List.renderList
|
||||||
renderSectionList :: (Traversable t, Ord n, Show n, Eq n, L.Splittable t)
|
renderSectionList :: forall n t e . (Traversable t, Ord n, Show n, Eq n, L.Splittable t, Semigroup (t e))
|
||||||
=> (Bool -> e -> Widget n) -- ^ Rendering function of the list element, True for the selected element
|
=> (Bool -> e -> Widget n) -- ^ Rendering function of the list element, True for the selected element
|
||||||
-> Bool -- ^ Whether the section list has focus
|
-> Bool -- ^ Whether the section list has focus
|
||||||
-> GenericSectionList n t e -- ^ The section list to render
|
-> GenericSectionList n t e -- ^ The section list to render
|
||||||
-> Widget n
|
-> Widget n
|
||||||
renderSectionList render_elem section_focus (GenericSectionList focus elms sl_name) =
|
renderSectionList renderElem sectionFocus ge@(GenericSectionList focus elms slName) =
|
||||||
Brick.Widget Brick.Greedy Brick.Greedy $ do
|
Brick.Widget Brick.Greedy Brick.Greedy $ Brick.render $ Brick.viewport slName Brick.Vertical $
|
||||||
c <- Brick.getContext
|
V.ifoldl' (\(!accWidget) !i list ->
|
||||||
let -- A section is focused if the whole thing is focused, and the inner list has focus
|
let hasFocusList = sectionIsFocused list
|
||||||
section_is_focused l = section_focus && (Just (L.listName l) == F.focusGetCurrent focus)
|
makeVisible = if hasFocusList then Brick.visibleRegion (Brick.Location (c, r)) (1, 1) else id
|
||||||
-- We need to limit the widget size when the length of the list is higher than the size of the terminal
|
appendBorder = if i == 0 then id else (hBorder <=>)
|
||||||
limit = min (Brick.windowHeight c) (Brick.availHeight c)
|
newWidget = appendBorder (makeVisible $ renderInnerList hasFocusList list)
|
||||||
s_idx = fromMaybe 0 $ V.findIndex section_is_focused elms
|
in accWidget <=> newWidget
|
||||||
render_inner_list has_focus l = Brick.vLimit (length l) $ L.renderList (\b -> render_elem (b && has_focus)) has_focus l
|
)
|
||||||
(widget, off) =
|
Brick.emptyWidget
|
||||||
V.ifoldl' (\wacc i list ->
|
elms
|
||||||
let has_focus_list = section_is_focused list
|
where
|
||||||
(!acc_widget, !acc_off) = wacc
|
-- A section is focused if the whole thing is focused, and the inner list has focus
|
||||||
new_widget = if i == 0 then render_inner_list has_focus_list list else hBorder <=> render_inner_list has_focus_list list
|
sectionIsFocused :: L.GenericList n t e -> Bool
|
||||||
new_off
|
sectionIsFocused l = sectionFocus && (Just (L.listName l) == F.focusGetCurrent focus)
|
||||||
| i < s_idx = 1 + L.listItemHeight list * length list
|
|
||||||
| i == s_idx = 1 + L.listItemHeight list * fromMaybe 0 (L.listSelected list)
|
renderInnerList :: Bool -> L.GenericList n t e -> Widget n
|
||||||
| otherwise = 0
|
renderInnerList hasFocus l = Brick.vLimit (length l) $ L.renderList (\b -> renderElem (b && hasFocus)) hasFocus l
|
||||||
in (acc_widget <=> new_widget, acc_off + new_off)
|
|
||||||
)
|
-- compute the location to focus on within the active section
|
||||||
(Brick.emptyWidget, 0)
|
(c, r) :: (Int, Int) = case sectionListSelectedElement ge of
|
||||||
elms
|
Nothing -> (0, 0)
|
||||||
Brick.render $ Brick.viewport sl_name Brick.Vertical $ Brick.translateBy (Brick.Location (0, min 0 (limit-off))) widget
|
Just (selElIx, _) -> (0, selElIx)
|
||||||
|
|
||||||
|
|
||||||
-- | Equivalent to listSelectedElement
|
-- | Equivalent to listSelectedElement
|
||||||
sectionListSelectedElement :: (Eq n, L.Splittable t, Traversable t, Semigroup (t e)) => GenericSectionList n t e -> Maybe (Int, e)
|
sectionListSelectedElement :: (Eq n, L.Splittable t, Traversable t, Semigroup (t e)) => GenericSectionList n t e -> Maybe (Int, e)
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ else
|
|||||||
constraints: http-io-streams -brotli,
|
constraints: http-io-streams -brotli,
|
||||||
any.aeson >= 2.0.1.0
|
any.aeson >= 2.0.1.0
|
||||||
|
|
||||||
|
if os(mingw32)
|
||||||
|
if impl(ghc >= 9.4)
|
||||||
|
constraints: language-c >= 0.9.3
|
||||||
|
|
||||||
source-repository-package
|
source-repository-package
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/haskell/tar.git
|
location: https://github.com/haskell/tar.git
|
||||||
@@ -22,6 +26,11 @@ source-repository-package
|
|||||||
location: https://github.com/hasufell/uri-bytestring.git
|
location: https://github.com/hasufell/uri-bytestring.git
|
||||||
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
||||||
|
|
||||||
|
source-repository-package
|
||||||
|
type: git
|
||||||
|
location: https://github.com/hasufell/versions.git
|
||||||
|
tag: 79e18fbc44fae3064d8957c550cc0229465db320
|
||||||
|
|
||||||
package libarchive
|
package libarchive
|
||||||
flags: -system-libarchive
|
flags: -system-libarchive
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.dlist ==1.0,
|
any.dlist ==1.0,
|
||||||
dlist -werror,
|
dlist -werror,
|
||||||
any.exceptions ==0.10.4,
|
any.exceptions ==0.10.4,
|
||||||
|
any.file-uri ==0.1.0.0,
|
||||||
any.filepath ==1.4.2.1,
|
any.filepath ==1.4.2.1,
|
||||||
any.foldable1-classes-compat ==0.1,
|
any.foldable1-classes-compat ==0.1,
|
||||||
foldable1-classes-compat +tagged,
|
foldable1-classes-compat +tagged,
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ else
|
|||||||
constraints: http-io-streams -brotli,
|
constraints: http-io-streams -brotli,
|
||||||
any.aeson >= 2.0.1.0
|
any.aeson >= 2.0.1.0
|
||||||
|
|
||||||
|
if os(mingw32)
|
||||||
|
if impl(ghc >= 9.4)
|
||||||
|
constraints: language-c >= 0.9.3
|
||||||
|
|
||||||
source-repository-package
|
source-repository-package
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/haskell/tar.git
|
location: https://github.com/haskell/tar.git
|
||||||
@@ -22,6 +26,11 @@ source-repository-package
|
|||||||
location: https://github.com/hasufell/uri-bytestring.git
|
location: https://github.com/hasufell/uri-bytestring.git
|
||||||
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
||||||
|
|
||||||
|
source-repository-package
|
||||||
|
type: git
|
||||||
|
location: https://github.com/hasufell/versions.git
|
||||||
|
tag: 79e18fbc44fae3064d8957c550cc0229465db320
|
||||||
|
|
||||||
package libarchive
|
package libarchive
|
||||||
flags: -system-libarchive
|
flags: -system-libarchive
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.dlist ==1.0,
|
any.dlist ==1.0,
|
||||||
dlist -werror,
|
dlist -werror,
|
||||||
any.exceptions ==0.10.4,
|
any.exceptions ==0.10.4,
|
||||||
|
any.file-uri ==0.1.0.0,
|
||||||
any.filepath ==1.4.2.1,
|
any.filepath ==1.4.2.1,
|
||||||
any.foldable1-classes-compat ==0.1,
|
any.foldable1-classes-compat ==0.1,
|
||||||
foldable1-classes-compat +tagged,
|
foldable1-classes-compat +tagged,
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ else
|
|||||||
constraints: http-io-streams -brotli,
|
constraints: http-io-streams -brotli,
|
||||||
any.aeson >= 2.0.1.0
|
any.aeson >= 2.0.1.0
|
||||||
|
|
||||||
|
if os(mingw32)
|
||||||
|
if impl(ghc >= 9.4)
|
||||||
|
constraints: language-c >= 0.9.3
|
||||||
|
|
||||||
source-repository-package
|
source-repository-package
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/haskell/tar.git
|
location: https://github.com/haskell/tar.git
|
||||||
@@ -22,6 +26,11 @@ source-repository-package
|
|||||||
location: https://github.com/hasufell/uri-bytestring.git
|
location: https://github.com/hasufell/uri-bytestring.git
|
||||||
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
||||||
|
|
||||||
|
source-repository-package
|
||||||
|
type: git
|
||||||
|
location: https://github.com/hasufell/versions.git
|
||||||
|
tag: 79e18fbc44fae3064d8957c550cc0229465db320
|
||||||
|
|
||||||
package libarchive
|
package libarchive
|
||||||
flags: -system-libarchive
|
flags: -system-libarchive
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.dlist ==1.0,
|
any.dlist ==1.0,
|
||||||
dlist -werror,
|
dlist -werror,
|
||||||
any.exceptions ==0.10.4,
|
any.exceptions ==0.10.4,
|
||||||
|
any.file-uri ==0.1.0.0,
|
||||||
any.filepath ==1.4.2.2,
|
any.filepath ==1.4.2.2,
|
||||||
any.foldable1-classes-compat ==0.1,
|
any.foldable1-classes-compat ==0.1,
|
||||||
foldable1-classes-compat +tagged,
|
foldable1-classes-compat +tagged,
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ else
|
|||||||
constraints: http-io-streams -brotli,
|
constraints: http-io-streams -brotli,
|
||||||
any.aeson >= 2.0.1.0
|
any.aeson >= 2.0.1.0
|
||||||
|
|
||||||
|
if os(mingw32)
|
||||||
|
if impl(ghc >= 9.4)
|
||||||
|
constraints: language-c >= 0.9.3
|
||||||
|
|
||||||
source-repository-package
|
source-repository-package
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/haskell/tar.git
|
location: https://github.com/haskell/tar.git
|
||||||
@@ -22,6 +26,11 @@ source-repository-package
|
|||||||
location: https://github.com/hasufell/uri-bytestring.git
|
location: https://github.com/hasufell/uri-bytestring.git
|
||||||
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
||||||
|
|
||||||
|
source-repository-package
|
||||||
|
type: git
|
||||||
|
location: https://github.com/hasufell/versions.git
|
||||||
|
tag: 79e18fbc44fae3064d8957c550cc0229465db320
|
||||||
|
|
||||||
package libarchive
|
package libarchive
|
||||||
flags: -system-libarchive
|
flags: -system-libarchive
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ constraints: any.Cabal ==3.6.3.0 || ==3.8.1.0,
|
|||||||
any.dlist ==1.0,
|
any.dlist ==1.0,
|
||||||
dlist -werror,
|
dlist -werror,
|
||||||
any.exceptions ==0.10.5,
|
any.exceptions ==0.10.5,
|
||||||
|
any.file-uri ==0.1.0.0,
|
||||||
any.filepath ==1.4.2.2,
|
any.filepath ==1.4.2.2,
|
||||||
any.foldable1-classes-compat ==0.1,
|
any.foldable1-classes-compat ==0.1,
|
||||||
foldable1-classes-compat +tagged,
|
foldable1-classes-compat +tagged,
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ source-repository-package
|
|||||||
location: https://github.com/hasufell/uri-bytestring.git
|
location: https://github.com/hasufell/uri-bytestring.git
|
||||||
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
||||||
|
|
||||||
|
source-repository-package
|
||||||
|
type: git
|
||||||
|
location: https://github.com/hasufell/versions.git
|
||||||
|
tag: 79e18fbc44fae3064d8957c550cc0229465db320
|
||||||
|
|
||||||
package libarchive
|
package libarchive
|
||||||
flags: -system-libarchive
|
flags: -system-libarchive
|
||||||
|
|
||||||
|
|||||||
@@ -56,3 +56,10 @@ source-repository-package
|
|||||||
location: https://github.com/hasufell/uri-bytestring.git
|
location: https://github.com/hasufell/uri-bytestring.git
|
||||||
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
tag: 4fb5ed14b500c192e6e7a97f6b2b1eb478806001
|
||||||
|
|
||||||
|
source-repository-package
|
||||||
|
type: git
|
||||||
|
location: https://github.com/hasufell/versions.git
|
||||||
|
tag: 79e18fbc44fae3064d8957c550cc0229465db320
|
||||||
|
|
||||||
|
allow-newer: cabal-install-parsers:tar
|
||||||
|
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ adjust_bashrc() {
|
|||||||
;;
|
;;
|
||||||
fish)
|
fish)
|
||||||
mkdir -p "${GHCUP_PROFILE_FILE%/*}"
|
mkdir -p "${GHCUP_PROFILE_FILE%/*}"
|
||||||
sed -i -e '/# ghcup-env$/ s/^#*/#/' "$(posix_realpath "${GHCUP_PROFILE_FILE}")"
|
sed -i -e '/# ghcup-env$/d' "$(posix_realpath "${GHCUP_PROFILE_FILE}")"
|
||||||
case $1 in
|
case $1 in
|
||||||
1)
|
1)
|
||||||
printf "\n%s" "set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX \$HOME ; set -gx PATH \$HOME/.cabal/bin $GHCUP_BIN \$PATH # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
printf "\n%s" "set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX \$HOME ; set -gx PATH \$HOME/.cabal/bin $GHCUP_BIN \$PATH # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
||||||
@@ -538,12 +538,12 @@ adjust_bashrc() {
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
bash)
|
bash)
|
||||||
sed -i -e '/# ghcup-env$/ s/^#*/#/' "$(posix_realpath "${GHCUP_PROFILE_FILE}")"
|
sed -i -e '/# ghcup-env$/d' "$(posix_realpath "${GHCUP_PROFILE_FILE}")"
|
||||||
printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && . \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
||||||
case "${plat}" in
|
case "${plat}" in
|
||||||
"Darwin"|"darwin")
|
"Darwin"|"darwin")
|
||||||
if ! grep -q "ghcup-env" "${HOME}/.bash_profile" ; then
|
if ! grep -q "ghcup-env" "${HOME}/.bash_profile" ; then
|
||||||
printf "\n%s" "[[ -f ~/.bashrc ]] && source ~/.bashrc # ghcup-env" >> "${HOME}/.bash_profile"
|
printf "\n%s" "[[ -f ~/.bashrc ]] && . ~/.bashrc # ghcup-env" >> "${HOME}/.bash_profile"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
MSYS*|MINGW*|CYGWIN*)
|
MSYS*|MINGW*|CYGWIN*)
|
||||||
@@ -557,15 +557,19 @@ adjust_bashrc() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
zsh)
|
zsh)
|
||||||
sed -i -e '/# ghcup-env$/ s/^#*/#/' "$(posix_realpath "${GHCUP_PROFILE_FILE}")"
|
sed -i -e '/# ghcup-env$/d' "$(posix_realpath "${GHCUP_PROFILE_FILE}")"
|
||||||
printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && . \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
if [ -e "$HOME/.profile" ] ; then
|
||||||
|
sed -i -e '/# ghcup-env$/d' "$(posix_realpath "$HOME/.profile")"
|
||||||
|
printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && . \"${GHCUP_DIR}/env\" # ghcup-env" >> "$HOME/.profile"
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
echo "==============================================================================="
|
echo "==============================================================================="
|
||||||
echo
|
echo
|
||||||
warn "OK! ${GHCUP_PROFILE_FILE} has been modified. Restart your terminal for the changes to take effect,"
|
warn "OK! ${GHCUP_PROFILE_FILE} has been modified. Restart your terminal for the changes to take effect,"
|
||||||
warn "or type \"source ${GHCUP_DIR}/env\" to apply them in your current terminal session."
|
warn "or type \". ${GHCUP_DIR}/env\" to apply them in your current terminal session."
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ param (
|
|||||||
# The Msys2 sha256sum hash
|
# The Msys2 sha256sum hash
|
||||||
[string]$Msys2Hash,
|
[string]$Msys2Hash,
|
||||||
# Whether to disable creation of several desktop shortcuts
|
# Whether to disable creation of several desktop shortcuts
|
||||||
[switch]$DontWriteDesktopShortcuts
|
[switch]$DontWriteDesktopShortcuts,
|
||||||
|
# Whether to disable adjusting bashrc (in msys2 env) with PATH
|
||||||
|
[switch]$DontAdjustBashRc
|
||||||
)
|
)
|
||||||
|
|
||||||
$DefaultMsys2Version = "20221216"
|
$DefaultMsys2Version = "20221216"
|
||||||
@@ -647,10 +649,14 @@ if ($DisableCurl) {
|
|||||||
$DownloadScript = 'curl --proto ''=https'' --tlsv1.2 -sSf'
|
$DownloadScript = 'curl --proto ''=https'' --tlsv1.2 -sSf'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!($DontAdjustBashRc)) {
|
||||||
|
$AdjustBashRcExport = 'export BOOTSTRAP_HASKELL_ADJUST_BASHRC=1 ;'
|
||||||
|
}
|
||||||
|
|
||||||
if ((Get-Process -ID $PID).ProcessName.StartsWith("bootstrap-haskell") -Or $InBash) {
|
if ((Get-Process -ID $PID).ProcessName.StartsWith("bootstrap-haskell") -Or $InBash) {
|
||||||
Exec "$Bash" '-lc' ('{4} {6} {7} {8} {9} {10} [ -n ''{1}'' ] && export GHCUP_MSYS2=$(cygpath -m ''{1}'') ; [ -n ''{2}'' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m ''{2}/'') ; export PATH=$(cygpath -u ''{3}/bin''):$PATH ; export CABAL_DIR=''{5}'' ; [[ ''{0}'' = https* ]] && {11} {0} | bash || cat $(cygpath -m ''{0}'') | bash' -f $BootstrapUrl, $MsysDir, $GhcupBasePrefix, $GhcupDir, $SilentExport, $CabalDirFull, $StackInstallExport, $HLSInstallExport, $AdjustCabalConfigExport, $MinimalExport, $BootstrapDownloader, $DownloadScript)
|
Exec "$Bash" '-lc' ('{4} {6} {7} {8} {9} {10} {12} [ -n ''{1}'' ] && export GHCUP_MSYS2=$(cygpath -m ''{1}'') ; [ -n ''{2}'' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m ''{2}/'') ; export PATH=$(cygpath -u ''{3}/bin''):$PATH ; export CABAL_DIR=''{5}'' ; [[ ''{0}'' = https* ]] && {11} {0} | bash || cat $(cygpath -m ''{0}'') | bash' -f $BootstrapUrl, $MsysDir, $GhcupBasePrefix, $GhcupDir, $SilentExport, $CabalDirFull, $StackInstallExport, $HLSInstallExport, $AdjustCabalConfigExport, $MinimalExport, $BootstrapDownloader, $DownloadScript, $AdjustBashRcExport)
|
||||||
} else {
|
} else {
|
||||||
Exec "$Msys2Shell" '-mingw64' '-mintty' '-shell' 'bash' '-c' ('{4} {6} {7} {8} {9} {10} [ -n ''{1}'' ] && export GHCUP_MSYS2=$(cygpath -m ''{1}'') ; [ -n ''{2}'' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m ''{2}/'') ; export PATH=$(cygpath -u ''{3}/bin''):$PATH ; export CABAL_DIR=''{5}'' ; trap ''echo Press any key to exit && read -n 1 && exit'' 2 ; [[ ''{0}'' = https* ]] && {11} {0} | bash || cat $(cygpath -m ''{0}'') | bash ; echo ''Press any key to exit'' && read -n 1' -f $BootstrapUrl, $MsysDir, $GhcupBasePrefix, $GhcupDir, $SilentExport, $CabalDirFull, $StackInstallExport, $HLSInstallExport, $AdjustCabalConfigExport, $MinimalExport, $BootstrapDownloader, $DownloadScript)
|
Exec "$Msys2Shell" '-mingw64' '-mintty' '-shell' 'bash' '-c' ('{4} {6} {7} {8} {9} {10} {12} [ -n ''{1}'' ] && export GHCUP_MSYS2=$(cygpath -m ''{1}'') ; [ -n ''{2}'' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m ''{2}/'') ; export PATH=$(cygpath -u ''{3}/bin''):$PATH ; export CABAL_DIR=''{5}'' ; trap ''echo Press any key to exit && read -n 1 && exit'' 2 ; [[ ''{0}'' = https* ]] && {11} {0} | bash || cat $(cygpath -m ''{0}'') | bash ; echo ''Press any key to exit'' && read -n 1' -f $BootstrapUrl, $MsysDir, $GhcupBasePrefix, $GhcupDir, $SilentExport, $CabalDirFull, $StackInstallExport, $HLSInstallExport, $AdjustCabalConfigExport, $MinimalExport, $BootstrapDownloader, $DownloadScript, $AdjustBashRcExport)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user