From 7ea21ac3ea009e3be0d8e1e644cbecc9f57a623e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 3 Dec 2022 19:24:22 +0100 Subject: fix .gitattributes --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index 26a9424..78efe19 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,8 @@ *.sh text eol=lf +/links-* text eol=lf + /.github/ export-ignore .gitattributes export-ignore .gitignore export-ignore -- cgit v1.2.3 From 9953a10d88edfcfd5ce2998f1f7b5f4e795b5c23 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 24 Jan 2023 10:08:04 +0100 Subject: workflows/ci: test on macOS --- .github/workflows/ci.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c0cd21..f4954c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,23 @@ on: jobs: test: - runs-on: ubuntu-latest - name: Test + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: '${{ matrix.os }}' + name: 'Test / ${{ matrix.os }}' steps: - name: Checkout uses: actions/checkout@v3 + + - name: Install dependencies + run: | + brew install bash coreutils findutils + echo "$(brew --prefix)/opt/coreutils/libexec/gnubin" >> "$GITHUB_PATH" + echo "$(brew --prefix)/opt/findutils/libexec/gnubin" >> "$GITHUB_PATH" + if: runner.os == 'macOS' + # Is it even macOS anymore? It is for me. I really am too lazy to deal + # with ancient utilities that come with the actual macOS. + - name: Test run: ./test/test.sh -- cgit v1.2.3 From 528d66680432d772bf01a3dbc043d2477bfe8d57 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 24 Jan 2023 10:22:13 +0100 Subject: os.sh: no need to use uname here --- src/os.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/os.sh b/src/os.sh index 2f1b4bb..60c0f9a 100644 --- a/src/os.sh +++ b/src/os.sh @@ -5,11 +5,8 @@ # Mostly Cygwin-related stuff -os="$( uname -o )" -readonly os - is_cygwin() { - test "$os" == 'Cygwin' + test "$OSTYPE" == 'cygwin' } check_symlinks_enabled_cygwin() { -- cgit v1.2.3 From 027f691bbb359845d9c838d70039ce710dd74e59 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 24 Jan 2023 10:23:24 +0100 Subject: test: fix macOS runs --- test/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test.sh b/test/test.sh index f2abfde..05c5d65 100755 --- a/test/test.sh +++ b/test/test.sh @@ -32,7 +32,9 @@ new_test() { echo ====================================================================== echo "New test: $test_name" - test_root_dir="$( mktemp --directory )" + test_root_dir="$( mktemp -d )" + # mktemp returns /var/..., which is actually in /private/var/... on macOS. + test_root_dir="$( readlink -e -- "$test_root_dir" )" test_src_dir="$test_root_dir/$src_dir_name" test_dest_dir="$test_root_dir/$dest_dir_name" test_alt_dest_dir="$test_root_dir/$alt_dest_dir_name" -- cgit v1.2.3 From 9abac87d341560920a9d4c0291a75ccdcb14df5d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 24 Jan 2023 10:28:30 +0100 Subject: README: update --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 2ff362c..4247989 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,11 @@ Installation * For Arch Linux, use the [AUR package]. * For Ubuntu, use the [PPA]. * Alternatively, just checkout this repository. +* For macOS, see [this section]. [AUR package]: https://aur.archlinux.org/packages/config-links/ [PPA]: https://launchpad.net/~egor-tensin/+archive/ubuntu/config-links +[this section]: #macos Usage ----- @@ -110,6 +112,13 @@ allows) are not supported. A special variable name `CONFIG_LINKS_ROOT` is resolved to the root path, "/". +macOS +----- + +macOS is supported on a basic level. +GNU coreutils and findutils are required, which you can install using Homebrew. +Don't forget to add them to PATH! + License ------- -- cgit v1.2.3