diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-11-03 15:37:10 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-11-03 15:37:10 -0200 |
commit | 4157aae3ea0f4b4af7d944944d9d96c3fb310e0b (patch) | |
tree | 6237a33f22120c66d678180c7398607dca7b869d | |
parent | aa8a7a84792bf89b571065bb7a9581a785f00702 (diff) | |
download | scripts-4157aae3ea0f4b4af7d944944d9d96c3fb310e0b.tar.gz scripts-4157aae3ea0f4b4af7d944944d9d96c3fb310e0b.tar.bz2 |
Adds zsync
-rwxr-xr-x | zsync | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +#!/bin/bash +# +# ZTD extension to commit, push and fetch a project. +# + +# Parameters +PROJECT="$1" + +# Try to get there +if [ ! -z "$PROJECT" ]; then + cd $PROJECT +fi + +# Sync +if [ -d '.git' ]; then + if which updates 2> /dev/null; then + updates + else + git commit -a -m "Updates $PROJECT" + git push + fi + + git fetch --all +fi |