Skip to content

Commit

Permalink
Update execute_process to avoid non-portable command usage
Browse files Browse the repository at this point in the history
  • Loading branch information
yamacir-kit committed Aug 31, 2024
1 parent 5cbcb36 commit 6fa8038
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.16.3) # Ubuntu 20.04 LTS default

execute_process(
COMMAND head -c -1 ${CMAKE_CURRENT_SOURCE_DIR}/VERSION
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/VERSION
COMMAND tr -d \n
OUTPUT_VARIABLE CURRENT_VERSION)

project(meevax
Expand Down Expand Up @@ -49,7 +50,10 @@ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --property
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/script/unicode.sh --upcase OUTPUT_VARIABLE ${PROJECT_NAME}_UNICODE_UPCASE)

execute_process(
COMMAND head -c -1 ${CMAKE_CURRENT_SOURCE_DIR}/configure/help.txt
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/configure/help.txt
COMMAND tr \n \r
COMMAND sed s/\r$//
COMMAND tr \r \n
OUTPUT_VARIABLE ${PROJECT_NAME}_HELP)

file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}/unicode/digit_value.hpp "${${PROJECT_NAME}_UNICODE_DIGIT_VALUE}")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.225_amd64.deb
sudo apt install build/meevax_0.5.226_amd64.deb
```

or
Expand Down Expand Up @@ -122,9 +122,9 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.5.225.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.5.226.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.5.225_amd64.deb`
| `package` | Generate debian package `meevax_0.5.226_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.225
0.5.226

0 comments on commit 6fa8038

Please sign in to comment.