-
Notifications
You must be signed in to change notification settings - Fork 10
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
2 changed files
with
55 additions
and
1 deletion.
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,52 @@ | ||
#!/usr/bin/env bash | ||
|
||
# set -x | ||
set -e | ||
|
||
# Get the directory where the script is located | ||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# Set the destination path relative to the script directory | ||
DEST_DIR="$SCRIPTDIR/../../monopacker-sboms/" | ||
DEST_DIR="$(realpath $DEST_DIR)" | ||
|
||
# Rsync command with additional excludes | ||
rsync -av \ | ||
--exclude=".gitignore" \ | ||
--exclude="*.sh" \ | ||
--exclude="old/" \ | ||
--exclude="*monopacker-testing*" \ | ||
--exclude="temp_sbom.md" \ | ||
--exclude="SBOM.md" \ | ||
--exclude="README.md" \ | ||
"$SCRIPTDIR/" "$DEST_DIR" | ||
|
||
# Explanation: | ||
# -a: archive mode (preserves symbolic links, file permissions, user & group ownerships, and timestamps) | ||
# -v: verbose output | ||
# --exclude: to exclude specific files or directories | ||
|
||
# here doc for ascii art | ||
cat << "EOF" | ||
## ## ## ### ### ### ## ## | ||
## ## # ## # ## # ## # ## ## | ||
### ## # ## ## #### ### ### | ||
## ## # ## # ## # ## ## ## | ||
### ### ### ### ### ### ### | ||
EOF | ||
|
||
# provide directions on how to commit the sboms | ||
cat <<EOF | ||
Please run the following to commit the copied SBOMs. | ||
cd $DEST_DIR | ||
git st | ||
# inspect and ensure the changes are correct | ||
git add . | ||
git commit -m "adding new SBOMs" | ||
git push | ||
EOF |