summarylogtreecommitdiffstats
path: root/upload
blob: f94e94cb7b5f069ee10852c017d17bcabff8fddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

PRG="$0"

while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`/"$link"
    fi
done
SCRIPT_HOME=`dirname "$PRG"`

$SCRIPT_HOME/update
if [ "$?" -eq 1 ]; then
  echo "Updating Git"
  cd $SCRIPT_HOME
  ver="$(grep pkgver= PKGBUILD | sed 's/.*=//g')"
  git commit -a -m "Update to $ver"
  git push
fi