testing..
This commit is contained in:
parent
6a427f8d5e
commit
8a7a9bddc6
1 changed files with 7 additions and 4 deletions
|
@ -9,19 +9,22 @@ function gsa
|
||||||
|
|
||||||
# ─< Prompt the user to enter the relative path where the submodule will be cloned >────────
|
# ─< Prompt the user to enter the relative path where the submodule will be cloned >────────
|
||||||
# ─< Advise not to use the leading / or ./ >────────────────────────────────────────────────
|
# ─< Advise not to use the leading / or ./ >────────────────────────────────────────────────
|
||||||
echo "-- enter the relative path, where the submodule will be cloned to. (don't use fist / or ./) --"
|
echo -n "-- enter the relative path, where the submodule will be cloned to. (don't use fist / or ./) --"
|
||||||
read -l -S path
|
read -l -S path
|
||||||
|
|
||||||
|
echo -n "-- enter a name for the submodule --"
|
||||||
|
read -l -S name
|
||||||
|
|
||||||
# ─< Ask the user for confirmation if the constructed command looks correct >───────────────
|
# ─< Ask the user for confirmation if the constructed command looks correct >───────────────
|
||||||
echo "git submodule add --branch $branch --name $path $repo"
|
echo "git submodule add --branch $branch --name $name $repo $path"
|
||||||
echo "-- does this command look right to you? [y/n] --"
|
echo -n "-- does this command look right to you? [y/n] --"
|
||||||
read -l comm
|
read -l comm
|
||||||
|
|
||||||
# ─< Switch statement to handle the user's confirmation input >─────────────────────────────
|
# ─< Switch statement to handle the user's confirmation input >─────────────────────────────
|
||||||
switch $comm
|
switch $comm
|
||||||
# ─< If the user inputs 'y' or 'Y', execute the git submodule add command >─────────────────
|
# ─< If the user inputs 'y' or 'Y', execute the git submodule add command >─────────────────
|
||||||
case 'y' 'Y'
|
case 'y' 'Y'
|
||||||
git submodule add --branch $branch --name $repo $path
|
git submodule add --branch $branch --name $name $repo $path
|
||||||
|
|
||||||
# ─< If the user inputs 'n' or 'N', notify them to try again >──────────────────────────────
|
# ─< If the user inputs 'n' or 'N', notify them to try again >──────────────────────────────
|
||||||
case 'n' 'N'
|
case 'n' 'N'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue