Skip to content

Commit 3303f73

Browse files
committed
Avoid reinstalling tools
1 parent ef8ca15 commit 3303f73

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

justfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,24 @@ code:
1313
install-tooling:
1414
@ just _install-tooling-all-platforms
1515
# Install imagemagick for mogrify.
16-
sudo apt install imagemagick
16+
command -v mogrify >/dev/null 2>&1 || sudo apt install imagemagick
17+
gh release download --clobber --pattern "hakyll-site" --dir ./dist
18+
chmod +x ./dist/hakyll-site
1719

1820
# Install tooling for working with the codetalk blog.
1921
[macos]
2022
install-tooling:
2123
@ just _install-tooling-all-platforms
2224
# Install imagemagick for mogrify.
23-
brew install imagemagick
25+
command -v mogrify >/dev/null 2>&1 || brew install imagemagick
2426

2527
_install-tooling-all-platforms:
2628
# Install stack.
27-
curl -sSL https://get.haskellstack.org/ | sh
29+
command -v stack >/dev/null 2>&1 || curl -sSL https://get.haskellstack.org/ | sh
2830
# Install ghcup.
29-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
31+
command -v ghcup >/dev/null 2>&1 || curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
3032
# Install sass.
31-
npm i -g sass
33+
command -v sass >/dev/null 2>&1 || npm i -g sass
3234

3335
# Setup dependencies and build the hakyll executable.
3436
setup project:

0 commit comments

Comments
 (0)