Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the documentation #372

Merged
merged 5 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export
# Run a single step from ./steps
define step
set -e
${LOCAL}/help/check-make.sh
start=$$(date +%s%N)
echo -e "\n\n\n+++ $(1) +++\n"
source "$(LOCAL)/help/gnu-utils.sh"
Expand Down Expand Up @@ -102,10 +103,6 @@ clean:
# Show some details about the environment we are running it
# (this is mostly for debugging in Docker)
env:
if [[ "$(MAKE_VERSION)" =~ ^[1-3] ]]; then
echo "Make must be 4+: $(MAKE_VERSION)"
exit 1
fi
$(call step,env)

# Get the list of repos from GitHub and then create directories
Expand Down
43 changes: 43 additions & 0 deletions help/check-make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# The MIT License (MIT)
#
# Copyright (c) 2021-2024 Yegor Bugayenko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

set -e
set -o pipefail

make_version=$(make --version | head -n1 | cut -d' ' -f3)
make_version_int=$(echo "${make_version}" | cut -d'.' -f1)

if [ "${make_version_int}" -lt 4 ]; then
echo "Make version must be 4 or higher. Current: ${make_version}"
if "${LOCAL}/help/is-macos.sh" ; then
echo "Try to update it with \"brew install make\""
if [ "$(uname -m)" = "arm64" ]; then
echo "Make sure you have \"/opt/homebrew/opt/make/libexec/gnubin\" in your PATH"
else
echo "Make sure you have \"/usr/local/opt/make/libexec/gnubin\" in your PATH"
fi
else
echo "Try to update it with \"sudo apt install make\""
fi
exit 1
fi
2 changes: 1 addition & 1 deletion steps/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bash_version=${BASH_VERSINFO:-0}
if [ "${bash_version}" -lt 5 ]; then
"${SHELL}" --version
ps -p $$
echo "${SHELL} version is older than five: ${bash_version}"
echo "${SHELL} version must be 5 or higher. Current ${SHELL} version: ${bash_version}"
exit 1
fi

Expand Down
Loading