SATS/update

16 lines
319 B
Bash
Executable File

#!/bin/sh
# [1] Send data + fetch configuration
/home/sats/satsd/source/lib/api/sync;
test $? -ne 0 && exit 127;
# [2] Update source
BRANCH=$(cat /home/sats/satsd/conf/machine.branch);
cd /home/sats/satsd/source/;
git checkout $BRANCH;
test $? -ne 0 && exit 127;
git pull origin $BRANCH;
test $? -ne 0 && exit 127;