mirror of
https://github.com/Snigdha-OS/Snigdha-OS.github.io.git
synced 2025-09-06 12:45:18 +02:00
🛠️ build(option): add more options
This commit is contained in:
@@ -11,6 +11,7 @@ print_options() {
|
|||||||
echo "1. 📝 Enter GitHub username and password"
|
echo "1. 📝 Enter GitHub username and password"
|
||||||
echo "2. 🔑 Enter GitHub personal access token"
|
echo "2. 🔑 Enter GitHub personal access token"
|
||||||
echo "3. 📁 Use existing GitHub credentials from ~/.gitconfig"
|
echo "3. 📁 Use existing GitHub credentials from ~/.gitconfig"
|
||||||
|
echo "4. Github user and email config"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Print options and prompt user to select
|
# Print options and prompt user to select
|
||||||
@@ -39,6 +40,14 @@ case $OPTION in
|
|||||||
3)
|
3)
|
||||||
echo "Using existing GitHub credentials from ~/.gitconfig"
|
echo "Using existing GitHub credentials from ~/.gitconfig"
|
||||||
;;
|
;;
|
||||||
|
4)
|
||||||
|
echo "Enter github email address: "
|
||||||
|
read -r USEREMAIL
|
||||||
|
echo "Enter GitHub username: "
|
||||||
|
read -r USERNAME
|
||||||
|
git config --global user.email "$USEREMAIL"
|
||||||
|
git config --global user.name "$USERNAME"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid option. Exiting."
|
echo "Invalid option. Exiting."
|
||||||
exit 1;;
|
exit 1;;
|
||||||
|
Reference in New Issue
Block a user