Skip to content

Commit

Permalink
Fix basename and ln for bsd compat. (#793)
Browse files Browse the repository at this point in the history
* use posix

* openbsd has no ln -v...

* openbsd does not support ln -v
  • Loading branch information
ober authored Sep 5, 2023
1 parent 856d6c6 commit 5a5c48e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ install() {
link_version() {
local base="${1}"
local version="${2}"
(cd "${base}" && rm -f current && ln -sfv "${version}" current) || die
(cd "${base}" && rm -f bin && ln -sfv current/bin bin) || die
(cd "${base}" && rm -f lib && ln -sfv current/lib lib) || die
(cd "${base}" && rm -f include && ln -sfv current/include include) || die
(cd "${base}" && rm -f share && ln -sfv current/share share) || die
(cd "${base}" && rm -f current && ln -sf "${version}" current) || die
(cd "${base}" && rm -f bin && ln -sf current/bin bin) || die
(cd "${base}" && rm -f lib && ln -sf current/lib lib) || die
(cd "${base}" && rm -f include && ln -sf current/include include) || die
(cd "${base}" && rm -f share && ln -sf current/share share) || die
}

if [ -e build-env.sh ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ build_tools () {
feedback_low "Building gerbil tools"
(cd tools && ./build.ss)
for tool in tools/gx*.ss; do
toolname=$(basename -s .ss $tool)
(cd "${GERBIL_BUILD_PREFIX}/bin" && ln -svf gerbil $toolname)
toolname=$(basename $tool .ss)
(cd "${GERBIL_BUILD_PREFIX}/bin" && ln -sf gerbil $toolname)
done
}

Expand Down

0 comments on commit 5a5c48e

Please sign in to comment.