a bin full of cool programs
'easy to push '
1 file changed, +9 -1
+9-1bin/gcom
| @@ -2,12 +2,20 @@ | ||
| 2 | 2 | echo -e "\e[38;5;118mAdding and committing all changes\e[0m" |
| 3 | 3 | git add --all |
| 4 | 4 | message="$@" |
| 5 | +push=false | |
| 6 | + | |
| 5 | 7 | if [[ "$message" =~ "-p" ]]; then |
| 6 | 8 | message=$(echo "$message" | sed 's/-p//g') |
| 7 | - git push | |
| 9 | + push=true | |
| 8 | 10 | fi |
| 11 | + | |
| 9 | 12 | if [[ "$message" =~ "'" ]]; then |
| 10 | 13 | git commit -m "$message" |
| 11 | 14 | else |
| 12 | 15 | git commit -m "'$message'" |
| 16 | +fi | |
| 17 | + | |
| 18 | +if [[ "$push" == true ]]; then | |
| 19 | + echo -e "\e[38;5;26mPushing to remote\e[0m" | |
| 20 | + git push | |
| 13 | 21 | fi |