changed gsa function

This commit is contained in:
pika 2024-06-06 23:17:26 +02:00
parent 70ebe3238c
commit 745728661f

View file

@ -118,20 +118,20 @@ function gsa
echo "-- enter the repository to add as a submodule --" echo "-- enter the repository to add as a submodule --"
read repo read repo
# ─< Prompt the user to enter the branch to checkout (e.g., main, master) >─────────────────
echo "-- enter the branch to checkout (main/master..) --"
read 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. (!! do it like this: ./path/to/clone/to) --" echo "-- enter the relative path, where the submodule will be cloned to. (!! do it like this: ./path/to/clone/to) --"
read -S path read -S path
# ─< Prompt the user to enter the branch to checkout (e.g., main, master) >─────────────────
echo "-- enter the branch to checkout (main/master..) --"
read branch
echo "-- enter a name for the submodule --" echo "-- enter a name for the submodule --"
read -l name read -l 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 $repo $path" echo "git submodule add --branch $branch --name $name $repo $path"
echo "-- does this command look right to you? [y/n] --" echo "-- does this command look right to you? [y/n] --"
read -l comm read -l comm