-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add memory management with simplified virtual memory translation
Add privilege modes Add mmu test and update bindings
- Loading branch information
Showing
25 changed files
with
1,050 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Check if at least two arguments (directories) are passed | ||
if [ "$#" -lt 2 ]; then | ||
echo "Usage: $0 <directory1> <directory2> ... <output_file>" | ||
exit 1 | ||
fi | ||
|
||
# Set the last argument as the output file | ||
output_file="${!#}" | ||
|
||
# Remove the output file if it exists to start fresh | ||
> "$output_file" | ||
|
||
# Iterate over all directories except the last argument (output file) | ||
for dir in "$@"; do | ||
if [ "$dir" != "$output_file" ]; then | ||
# Find .h and .cpp files in the directory and subdirectories | ||
find "$dir" -type f \( -name "*.h" -o -name "*.cpp" \) | while read -r file; do | ||
# Append the file contents to the output file with a separator | ||
echo "----- Start of $file -----" >> "$output_file" | ||
cat "$file" >> "$output_file" | ||
echo -e "\n----- End of $file -----\n" >> "$output_file" | ||
done | ||
fi | ||
done | ||
|
||
echo "Contents copied to $output_file." | ||
|
Oops, something went wrong.