addet better functionality
This commit is contained in:
parent
e6ad28ed36
commit
b0b5cc00cc
1 changed files with 5 additions and 4 deletions
|
@ -15,11 +15,11 @@ function gsa
|
|||
echo "-- enter the relative path, where the submodule will be cloned to. (don't use fist / or ./) --"
|
||||
read -l -S path
|
||||
|
||||
echo "-- enter a name for the submodule --"
|
||||
read -l name
|
||||
# echo "-- enter a name for the submodule --"
|
||||
# read -l name
|
||||
|
||||
# ─< Ask the user for confirmation if the constructed command looks correct >───────────────
|
||||
echo "git submodule add --branch $branch --name $name $repo $path"
|
||||
echo "git submodule add --branch $branch $repo $path"
|
||||
echo "-- does this command look right to you? [y/n] --"
|
||||
read -l comm
|
||||
|
||||
|
@ -27,7 +27,8 @@ function gsa
|
|||
switch $comm
|
||||
# ─< If the user inputs 'y' or 'Y', execute the git submodule add command >─────────────────
|
||||
case 'y' 'Y'
|
||||
git submodule add --branch $branch --name $name $repo $path
|
||||
git submodule add --branch $branch $repo $path
|
||||
git submodule update --init --recursive
|
||||
git add .
|
||||
git commit -m "Addet $name as a submodule"
|
||||
git push
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue