aboutsummarylogtreecommitdiffstats
path: root/upload
blob: 95f9a497ac51b5add18b4733e78ae030e88d936e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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
  git commit -a -m "Commit from upload script due to new version"
  git push
fi