Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.

Commit d7b1a30

Browse files
U-CIQDEV\gbazermanU-CIQDEV\gbazerman
authored andcommitted
os x -- ensure /usr/local dirs exist before symlinking in
1 parent 9e7565e commit d7b1a30

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hptool/os-extras/osx/bin/activate-hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ run() {
240240
fi
241241
}
242242

243+
ensureDirectoryExists() {
244+
run mkdir -p "$1"
245+
}
246+
243247
symLink() {
244248
run rm -rf "$2"
245249
run ln -sf "$1" "$2"
@@ -280,6 +284,10 @@ fi
280284
### Set up /usr
281285
###
282286

287+
ensureDirectoryExists /usr/local/bin
288+
ensureDirectoryExists /usr/local/share/man/man1
289+
ensureDirectoryExists /usr/local/share/doc
290+
283291
symLinkInto $ghcRoot/usr/bin/* /usr/local/bin
284292
symLinkInto $ghcRoot/usr/share/man/man1/* /usr/local/share/man/man1
285293
symLinkInto $ghcRoot/usr/share/doc/ghc /usr/local/share/doc

0 commit comments

Comments
 (0)