testing..
This commit is contained in:
parent
ed746fab09
commit
ee841aa0fd
1 changed files with 5 additions and 5 deletions
|
@ -1,27 +1,27 @@
|
||||||
function gsa
|
function gsa
|
||||||
# ─< Prompt the user to enter the repository URL to add as a submodule >────────────────────
|
# ─< Prompt the user to enter the repository URL to add as a submodule >────────────────────
|
||||||
echo "-- enter the repository to add as a submodule --"
|
echo -n "-- enter the repository to add as a submodule --"
|
||||||
read -l repo
|
read -l repo
|
||||||
|
|
||||||
# ─< Prompt the user to enter the branch to checkout (e.g., main, master) >─────────────────
|
# ─< Prompt the user to enter the branch to checkout (e.g., main, master) >─────────────────
|
||||||
echo "-- enter the branch to checkout (main/master..) --"
|
echo -n "-- enter the branch to checkout (main/master..) --"
|
||||||
read -l branch
|
read -l branch
|
||||||
|
|
||||||
# ─< 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
|
||||||
|
|
||||||
# ─< Ask the user for confirmation if the constructed command looks correct >───────────────
|
# ─< Ask the user for confirmation if the constructed command looks correct >───────────────
|
||||||
echo "-- does this command look right to you? [y/n] --"
|
|
||||||
echo "git submodule add --branch $branch --name $path $repo"
|
echo "git submodule add --branch $branch --name $path $repo"
|
||||||
|
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 $path $repo
|
git submodule add --branch $branch --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