aboutsummaryrefslogtreecommitdiff
path: root/zsync
blob: 007e548bfaab22a88beec7d3ab1b177b8dec1fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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