From 7530c818578bbf31833406f8144be316d7b27171 Mon Sep 17 00:00:00 2001 From: yamacir-kit Date: Sun, 8 Sep 2024 00:07:24 +0900 Subject: [PATCH] Add new script `setup-macos.sh` Signed-off-by: yamacir-kit --- .github/workflows/release.yaml | 2 +- README.md | 6 +++--- VERSION | 2 +- script/setup-macos-14.sh | 1 + script/setup-macos.sh | 35 ++++++++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 5 deletions(-) create mode 120000 script/setup-macos-14.sh create mode 100755 script/setup-macos.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 34a013e6a..b5f75c368 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV - - run: ./script/setup.sh + - run: ./script/setup-ubuntu.sh - run: cmake -B build -DCMAKE_BUILD_TYPE=Release - run: cmake --build build --target package - run: gh release create v${{ env.VERSION }} build/meevax_${{ env.VERSION }}_amd64.deb --title "Version ${{ env.VERSION }}" diff --git a/README.md b/README.md index 6f9bf08a1..dd6f554b2 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Procedures for each standard are provided by the following R7RS-style libraries: cmake -B build -DCMAKE_BUILD_TYPE=Release cd build make package -sudo apt install build/meevax_0.5.233_amd64.deb +sudo apt install build/meevax_0.5.234_amd64.deb ``` or @@ -122,9 +122,9 @@ sudo rm -rf /usr/local/share/meevax | Target Name | Description |-------------|------------- -| `all` | Build shared-library `libmeevax.0.5.233.so` and executable `meevax` +| `all` | Build shared-library `libmeevax.0.5.234.so` and executable `meevax` | `test` | Test executable `meevax` -| `package` | Generate debian package `meevax_0.5.233_amd64.deb` +| `package` | Generate debian package `meevax_0.5.234_amd64.deb` | `install` | Copy files into `/usr/local` directly ## Usage diff --git a/VERSION b/VERSION index 2c3ffcedb..0445208a8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.233 +0.5.234 diff --git a/script/setup-macos-14.sh b/script/setup-macos-14.sh new file mode 120000 index 000000000..93f928f11 --- /dev/null +++ b/script/setup-macos-14.sh @@ -0,0 +1 @@ +setup-macos.sh \ No newline at end of file diff --git a/script/setup-macos.sh b/script/setup-macos.sh new file mode 100755 index 000000000..f9a325a75 --- /dev/null +++ b/script/setup-macos.sh @@ -0,0 +1,35 @@ +#!/bin/sh -e + +required() +{ + echo gmp +} + +optional() +{ + echo gcc +} + +documentation() +{ + echo bibtex2html # script/references.sh + echo doxygen + echo pandoc # script/references.sh +} + +brew update + +if test "$#" -eq 0 +then + required | xargs brew install +else + for each in "$@" + do + case "$each" in + -a | --all ) ( required && optional && documentation ) | xargs brew install ;; + -d | --documentation ) ( documentation ) | xargs brew install ;; + -o | --optional ) ( optional ) | xargs brew install ;; + -r | --required ) ( required ) | xargs brew install ;; + esac + done +fi