-
-
Save simbafs/d6d60e23e1fc52ba33ede33ba02ada24 to your computer and use it in GitHub Desktop.
ok
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 | |
computer="/home/simba/git/" | |
termux="/data/data/com.termux/files/home/git" | |
until [[ -d .git ]] ; do | |
if [[ $pwd = $computer ]] ;then | |
break | |
fi | |
cd .. | |
done | |
[ -z $1 ] && message="change something" || message=$1 | |
[ -z $2 ] && respository="origin" || respository=$2 | |
cat <<HERE_DOCUMENT | |
> git add . | |
> git commit -m "$message" | |
> git push "$respository" | |
> [Y/n]? | |
HERE_DOCUMENT | |
read ans | |
if [ "x${ans}" = "xy" ] || [ "x${ans}" = "xY" ] || [ "x${ans}" = "x" ]; then | |
git add --all . && | |
git commit -m "$message" && | |
git push "$respository" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment