diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-09-30 16:36:43 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-09-30 16:36:43 +0200 |
commit | e0d14f7b20a6e859a988206b4e16981d6a67bf87 (patch) | |
tree | c029ef323d2c5cbbbe4a633ba0e1ad3d891ad9c1 /common/init | |
parent | fix(common/init): Be smarter, when suggesting an owner name (diff) | |
download | flake-templates-e0d14f7b20a6e859a988206b4e16981d6a67bf87.tar.gz flake-templates-e0d14f7b20a6e859a988206b4e16981d6a67bf87.zip |
feat(common/init): Ship a full git_template
Diffstat (limited to '')
-rw-r--r-- | common/init | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/common/init b/common/init index 7fdc1e6..bbf6f14 100644 --- a/common/init +++ b/common/init @@ -69,8 +69,6 @@ require mv require sed require chmod -git init - # necessary meta data prompt APPLICATION_NAME "The name of the application" "$(basename "$PWD")" prompt APPLICATION_NAME_STYLIZED "The stylized name of the application (for documentation)" "$(echo "$APPLICATION_NAME" | sed 's/[_-]/ /g' | sed 's/^\(\w\)/\U\1/g' | sed 's/ \(\w\)/ \U\1/g')" @@ -101,6 +99,11 @@ prompt APPLICATION_SOURCE_CODE_REPOSITORY "The package's source code repository prompt HOME_PAGE "The home page URL of the project" "https://$REPOSITORY.org/" prompt BUG_URL "The URL people should report bugs to" "$APPLICATION_SOURCE_CODE_REPOSITORY/issues" +# git stuff +prompt PUSH_URL "The url used to push this project" "git@$REMOTE:$OWNER/$REPOSITORY.git" +prompt CLONE_URL "The url used to clone this project" "git@$REMOTE:$OWNER/$REPOSITORY.git" +prompt MAIN_BRANCH "The name of the main branch" "$(git config init.defaultbranch)" + if [ -e ./watch.sh ]; then # Use a different default license in latex projects. init_default_license="CC-BY-SA-4.0" @@ -139,7 +142,7 @@ fi # Allow templates to add template specific prompts [ -e init.local ] && . ./init.local -echo "$DESCRIPTION" >.git/description +git init --initial-branch "$MAIN_BRANCH" --template="./git_template" while read -r var; do var_name="${var%=*}" |