From 832e501ca710d05dfb4c6abb63d058cc5a82ac3e Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Thu, 8 Sep 2022 23:32:15 -0700 Subject: [PATCH] :sparkles: Added licensing for init script --- scripts/bgit_init | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/bgit_init b/scripts/bgit_init index e0d95641..654e56f4 100644 --- a/scripts/bgit_init +++ b/scripts/bgit_init @@ -48,6 +48,28 @@ function b_init() { fi done + # prompt user if they'd like to generate a license + while true + do + read -e -r -p "${txtblue} would you like to generate a LICENSE?(y/n/help): ${txtyellow}" confirmlegit + if [[ $confirmlegit == "y" || $confirmlegit == "yes" ]] ; then + dependencycheck legit + read -e -r -p "${txtblue} enter license type: ${txtyellow}" license + legit p "${license}" + break + elif [[ $confirmlegit == "h" || $confirmlegit == "help" ]] ; then + dependencycheck legit + if command -v "bat" &> /dev/null ; then + legit l | bat + else + dependencycheck less + legit l | less + fi + else + break + fi + done + while true do read -e -r -p "${txtblue} would you like to make this an npm project?(y/n): ${txtyellow}" confirmnpm