-
-
Save roniemicro/538adb3d736f51f8c7b7 to your computer and use it in GitHub Desktop.
Update eMicrograph/docudex code if your system does not ask for git password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REPO_NAME="eMicrograph/docudex" | |
echo -n "Enter github Username: " | |
read USER_NAME | |
echo -n "Enter Password for ${USER_NAME}@github.com :" | |
read -s PASSWORD | |
echo | |
git checkout . | |
TEMP_REMOTE_NAME="temp$(date +%Y%m%d%H%m%s)" | |
{ | |
git remote add ${TEMP_REMOTE_NAME} "https://$USER_NAME:$PASSWORD@github.com/$REPO_NAME.git" | |
} || { | |
echo | |
} | |
{ | |
git pull ${TEMP_REMOTE_NAME} master | |
} || { | |
echo "Unable to update code from git" | |
} | |
git remote remove ${TEMP_REMOTE_NAME} | |
echo "Operation completed..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment