Skip to content

Commit

Permalink
otp: add license and remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
kikofernandez committed Dec 13, 2024
1 parent 29f056a commit 5da77be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 2 additions & 0 deletions make/gdb_tools_link
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2024 Ericsson and the Erlang/OTP contributors
https://github.com/erlang/otp-gdb-tools
2 changes: 2 additions & 0 deletions make/gdb_tools_vsn
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2024 Ericsson and the Erlang/OTP contributors
7b864f58c534699e4124e31ecfda86041b941037
18 changes: 7 additions & 11 deletions otp_build
Original file line number Diff line number Diff line change
Expand Up @@ -1061,10 +1061,10 @@ do_download_gdb_tools ()
set_common_vars() {
GDB_TOOLS_INSTALL_PATH="$ERL_TOP/erts/etc/unix/gdb-tools"
GDB_TOOLS_VSN_PATH="$ERL_TOP/make"
GDB_REPO=$(cat "$GDB_TOOLS_VSN_PATH/gdb_tools_link")
GDB_REPO=$(cat "$GDB_TOOLS_VSN_PATH/gdb_tools_link" | tail -n1)

# Version of gdb-tools to download
GDB_TOOLS_VSN=$(cat "$GDB_TOOLS_VSN_PATH/gdb_tools_vsn")
GDB_TOOLS_VSN=$(cat "$GDB_TOOLS_VSN_PATH/gdb_tools_vsn" | tail -n1)

# SHASUM_FORMAT has values: sha256sum, sha1sum, shasum
SHASUM_FORMAT=
Expand Down Expand Up @@ -1119,7 +1119,11 @@ do_update_gdb_tools ()
cd "$GDB_TOOLS_INSTALL_PATH" && \
git fetch $GDB_REPO && \
GDB_TOOLS_VSN=$(git log gdb_tools/master --oneline --no-abbrev-commit -n1 | cut -d" " -f1) && \
echo "$GDB_TOOLS_VSN" > "$ERL_TOP/make/gdb_tools_vsn"
cat <<EOF > "$ERL_TOP/make/gdb_tools_vsn"
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2024 Ericsson and the Erlang/OTP contributors
$GDB_TOOLS_VSN
EOF
else
echo "Please, download gdb_tools invoking the command: \`otp_build download_gdb_tools\`"
exit 1
Expand All @@ -1145,14 +1149,6 @@ do_update_gdb_tools ()
echo "Run \`otp_build download_gdb_tools\` to complete the installation of the update"
}

# $1: jit-reader.c, jit-reader.h, etc
# $2: DGB_TOOLS_VSN, e.g., maint-28, foo, etc it is guaranteed to be an existing branch
# that lives in "$ERL_TOP/make/$1.$SHASUM_FORMAT"
create_shasum_file() {
cat "$GDB_TOOLS_INSTALL_PATH/$1.$SHASUM_FORMAT" > "$GDB_TOOLS_VSN_PATH/$1.$SHASUM_FORMAT"
echo "$GDB_TOOLS_VSN" > "$ERL_TOP/make/gdb_tools_vsn"
}

choose_available_shasum ()
{
if command -v sha256sum > /dev/null; then
Expand Down

0 comments on commit 5da77be

Please sign in to comment.