From 0908745ed80ebfd53a45dbded7ac3809ec094976 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Tue, 8 Mar 2022 09:36:50 -0500 Subject: [PATCH] test --- template.aliases | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/template.aliases b/template.aliases index 4b4b51a..6b21ed5 100644 --- a/template.aliases +++ b/template.aliases @@ -1,4 +1,17 @@ -# The Contents of this file will be making Windows CLI commands for linux +# The Contents of this file will be running our setup command # Run Template Setup Script -alias template-setup='echo "Pulling Template git repositories" && templategitup && bash /etc/template_setup/template_setup.sh' +# alias template-setup='bash /etc/template_setup/template_setup.sh' + +template_setup_path="/etc/template_setup" +template_setup_repo="https://git.deathbybandaid.net/deathbybandaid/template_setup.git" + +template-setup () +{ + if [ -d "$template_setup_path" ] ; then + git -C $template_setup_path pull --quiet && echo "Pulled $template_setup_path" + else + git clone --quiet "$template_setup_repo" "$template_setup_path" && echo "Pulled $template_setup_path" + fi + bash /etc/template_setup/template_setup.sh +}