Skip to content

Commit

Permalink
add licenses to shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtian committed Sep 29, 2022
1 parent ca83bd9 commit 08195a3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions narwhal/.github/workflows/install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# Copyright (c) 2022, Mysten Labs, Inc.
# SPDX-License-Identifier: Apache-2.0

# Add clang & others
sudo apt-get update
Expand Down
2 changes: 2 additions & 0 deletions narwhal/Docker/entry.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# Copyright (c) 2022, Mysten Labs, Inc.
# SPDX-License-Identifier: Apache-2.0

# Capture stack trace
export RUST_BACKTRACE=1
Expand Down
2 changes: 2 additions & 0 deletions narwhal/Docker/gen.validators.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright (c) 2022, Mysten Labs, Inc.
# SPDX-License-Identifier: Apache-2.0
set -e

# number of primary instances to start.
Expand Down
4 changes: 3 additions & 1 deletion narwhal/scripts/license_check.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# Copyright (c) 2022, Mysten Labs, Inc.
# SPDX-License-Identifier: Apache-2.0
# shellcheck disable=SC2044
# This script checks each file starts with a license comment
set -e
Expand All @@ -8,7 +10,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TOPLEVEL="${DIR}/../"

# Iterate over rust files not in the target directory
for i in $(find "$TOPLEVEL" -path "$TOPLEVEL/target" -prune -o -iname "*.rs" -print)
for i in $(find "$TOPLEVEL" -path "$TOPLEVEL/target" -prune -o -iname "*.rs" -print)
do
echo "Checking $i"
CNT=$(head -n3 "$i" | grep -oEe '// (Copyright \(c\) 2022, Mysten Labs, Inc.|SPDX-License-Identifier: Apache-2.0)' | wc -l)
Expand Down

0 comments on commit 08195a3

Please sign in to comment.