-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make: create target directory if symlinked
Handles the case where the build directory is a symbolic link to another directory and the target directory does not exist. This allows seamlessly building lone in RAM using tmpfs by simply creating a symbolic link to a non-existent directory of a mounted RAM file system. ln -s /tmp/lone/build ln -s /run/user/1000/lone/build
- Loading branch information
1 parent
0194c20
commit ba1bb7a
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/bash | ||
|
||
directory="${1}" | ||
linked="$(readlink "${directory}")" | ||
result="${?}" | ||
|
||
if [[ "${result}" -eq 0 && ! -d "${linked}" ]]; then | ||
mkdir -p "${linked}" | ||
fi |