File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -77,18 +77,21 @@ The `stack new` command should have created the following files:
7777
7878```
7979.
80- ├── LICENSE
81- ├── Setup.hs
8280├── app
8381│ └── Main.hs
82+ ├── ChangeLog.md
83+ ├── LICENSE
8484├── my-project.cabal
85+ ├── package.yaml
86+ ├── README.md
87+ ├── Setup.hs
8588├── src
8689│ └── Lib.hs
8790├── stack.yaml
8891└── test
8992 └── Spec.hs
9093
91- 3 directories, 7 files
94+ 3 directories, 10 files
9295```
9396
9497So to manage your library:
Original file line number Diff line number Diff line change @@ -109,14 +109,15 @@ For further information see [YAML configuration](yaml_configuration.md)
109109 - https://github.com/commercialhaskell/stack/issues/565
110110
111111## Custom Snapshots
112- Currently WIP?
112+ See [ Custom Snapshots] ( custom_snapshot.md ) .
113+
113114### Issues Referenced
114115 - https://github.com/commercialhaskell/stack/issues/111
115116 - https://github.com/commercialhaskell/stack/issues/253
116117 - https://github.com/commercialhaskell/stack/issues/137
117118
118119## Intra-package Targets
119- stack supports intra-package targets, similar to ` cabal build COMPONENTS ` for
120+ Stack supports intra-package targets, similar to ` cabal build COMPONENTS ` for
120121situations when you don't want to build every target inside your package.
121122
122123Example:
Original file line number Diff line number Diff line change @@ -610,13 +610,15 @@ try_install_pkgs() {
610610
611611# Install packages using apt-get
612612apt_get_install_pkgs () {
613- # Grepping the output of dpkg-query and checking the overall status of the pipeline
614- # causes differing behaviors across various shell versions. So it is more portable to
615- # just check the staus of dpkg-query.
616- # See https://github.com/commercialhaskell/stack/pull/4770#pullrequestreview-229732166
617- if dpkg-query -W " $@ " > /dev/null 2>&1 ; then
613+ missing=
614+ for pkg in $* ; do
615+ if ! dpkg -s $pkg 2> /dev/null | grep ' ^Status:.*installed' > /dev/null; then
616+ missing=" $missing $pkg "
617+ fi
618+ done
619+ if [ " $missing " = " " ]; then
618620 info " Already installed!"
619- elif ! sudocmd " install required system dependencies" apt-get install -y ${QUIET: +-qq} " $@ " ; then
621+ elif ! sudocmd " install required system dependencies" apt-get install -y ${QUIET: +-qq} $missing ; then
620622 die " Installing apt packages failed. Please run 'apt-get update' and try again."
621623 fi
622624}
You can’t perform that action at this time.
0 commit comments