generated from krisnova/rust-nova
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
139 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# ---------------------------------------------------------------------------- # | ||
# Apache 2.0 License Copyright © 2022-2023 The Aurae Authors # | ||
# # | ||
# +--------------------------------------------+ # | ||
# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # | ||
# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # | ||
# | ███████║██║ ██║██████╔╝███████║█████╗ | # | ||
# | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # | ||
# | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # | ||
# | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # | ||
# +--------------------------------------------+ # | ||
# # | ||
# Distributed Systems Runtime # | ||
# # | ||
# ---------------------------------------------------------------------------- # | ||
# # | ||
# Licensed under the Apache License, Version 2.0 (the "License"); # | ||
# you may not use this file except in compliance with the License. # | ||
# You may obtain a copy of the License at # | ||
# # | ||
# http://www.apache.org/licenses/LICENSE-2.0 # | ||
# # | ||
# Unless required by applicable law or agreed to in writing, software # | ||
# distributed under the License is distributed on an "AS IS" BASIS, # | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # | ||
# See the License for the specific language governing permissions and # | ||
# limitations under the License. # | ||
# # | ||
# ---------------------------------------------------------------------------- # | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* -------------------------------------------------------------------------- *\ | ||
* Apache 2.0 License Copyright © 2022-2023 The Aurae Authors * | ||
* * | ||
* +--------------------------------------------+ * | ||
* | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * | ||
* | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * | ||
* | ███████║██║ ██║██████╔╝███████║█████╗ | * | ||
* | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * | ||
* | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * | ||
* | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * | ||
* +--------------------------------------------+ * | ||
* * | ||
* Distributed Systems Runtime * | ||
* * | ||
* -------------------------------------------------------------------------- * | ||
* * | ||
* Licensed under the Apache License, Version 2.0 (the "License"); * | ||
* you may not use this file except in compliance with the License. * | ||
* You may obtain a copy of the License at * | ||
* * | ||
* http://www.apache.org/licenses/LICENSE-2.0 * | ||
* * | ||
* Unless required by applicable law or agreed to in writing, software * | ||
* distributed under the License is distributed on an "AS IS" BASIS, * | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * | ||
* See the License for the specific language governing permissions and * | ||
* limitations under the License. * | ||
* * | ||
\* -------------------------------------------------------------------------- */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env bash | ||
# ---------------------------------------------------------------------------- # | ||
# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # | ||
# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # | ||
# | ███████║██║ ██║██████╔╝███████║█████╗ | # | ||
# | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # | ||
# | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # | ||
# | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # | ||
# +--------------------------------------------+ # | ||
# # | ||
# Distributed Systems Runtime # | ||
# ---------------------------------------------------------------------------- # | ||
# Copyright 2022 - 2024, the aurae contributors # | ||
# SPDX-License-Identifier: Apache-2.0 # | ||
# ---------------------------------------------------------------------------- # | ||
# | ||
# strips SPDX headers from source and scripts | ||
|
||
function info() { | ||
green='[0;32m' | ||
nc='[0m' | ||
printf "${green}%s${nc}\n" "$1" | ||
} | ||
|
||
# This script assumes running from the top level directory within a Makefile | ||
D=$(pwd) | ||
if [[ $D == *"hack"* ]]; then | ||
echo "" | ||
echo "/hack is a special directory. These scripts should only be executed from the Makefile." | ||
echo "..or the directory above this one." | ||
echo "" | ||
exit 99 | ||
fi | ||
|
||
# contains $SCRIPTS, $SOURCES, $EXPECTEDSOURCE, $EXPECTEDSCRIPT | ||
. hack/file-definitions | ||
|
||
# simpler method of stripping headers for source that doesn't need to worry about shebang | ||
function strip_source_header() { | ||
local file="$1" | ||
local expected="$2" | ||
# Bypass files here | ||
if [ "$file" == "ignore.me" ]; then | ||
return | ||
fi | ||
|
||
HEADER_LINES=29 | ||
FILE_HEADER=$(head -n "$HEADER_LINES" "$file") | ||
if [ "$FILE_HEADER" = "$expected" ]; then | ||
info " -> [MUTATING SOURCE FILE] Stripping header: $file" | ||
# strip the header from the source | ||
tail -n +$((HEADER_LINES + 1)) "$file" > "${file}.tmp" && mv "${file}.tmp" "$file" | ||
else | ||
info " -> [SKIPPING SOURCE FILE] $file" | ||
if [ "${SHOW_DEBUG:-0}" -gt 0 ] ; then | ||
info "File Header:" | ||
echo "$FILE_HEADER" | ||
info "Expected Header:" | ||
echo "$expected" | ||
fi | ||
fi | ||
} | ||
|
||
echo "" | ||
echo " [ Stripping Source ] " | ||
echo "" | ||
for FILE in $SOURCES; do | ||
strip_source_header "$FILE" "$EXPECTEDSOURCESTRIP" | ||
done |
Empty file.