Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create package script add properietary lincense #171

Merged
merged 3 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions scripts/create-new-package.bash
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,16 @@ echo -e "${TERMINAL_COLOR_USER_NOTICE}The name '$MAINTAINER_NAME' and email addr

# License options for a multiple choice
license_user_input_option="user input"
licence_team_option="Current team license standard: ['$TEAM_LICENSE']"
licence_team_option="Current team license standard: '${TEAM_LICENSE}'"
licence_proprietary="Proprietary License - Stogl Robotics"

if [[ $ros_version == 1 ]]; then
supported_licenses=""
elif [[ $ros_version == 2 ]]; then
supported_licenses=$(ros2 pkg create dummy --license "?")
supported_licenses=${supported_licenses#"Supported licenses:"}
fi
license_options=("$license_user_input_option" "$licence_team_option")
license_options=("$license_user_input_option" "$licence_team_option" "$licence_proprietary")
license_options+=($supported_licenses)

echo ""
Expand All @@ -169,6 +171,13 @@ do
LICENSE="$TEAM_LICENSE"
break
;;
"$licence_proprietary")
read -p "Enter name of license (e.g. 'Propriatery License'): " NAME_OF_LICENSE
YEAR=$(date +'%Y')
LICENSE=$(<"${LICENSE_TEMPLATES}/proprietary_company_header.txt")
LICENSE=$(echo "${LICENSE}" | sed -e "s/\\\$YEAR\\\$/${YEAR}/g; s/\\\$NAME_ON_LICENSE\\\$/${NAME_OF_LICENSE}/g")
break
;;
*)
LICENSE="$licence_option"
break
Expand Down
1 change: 1 addition & 0 deletions templates/licenses/proprietary_company_header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (c) $YEAR$, $NAME_ON_LICENSE$
Loading