First update is init

This commit is contained in:
xdrm-brackets 2017-03-10 15:18:52 +01:00
parent 500c93b72f
commit b0a875cfea
2 changed files with 15 additions and 2 deletions

0
first_update Normal file
View File

17
update
View File

@ -6,9 +6,22 @@ source $__DIR__/lib/include/bash/const;
source $__DIR__/lib/include/bash/func;
# [1] Send data + fetch configuration
test "$($SOURCE_DIR/lib/api/sync)" = "127" && slog "sync failed" - "update" && exit;
if [ -e /home/sats/satsd/source/first_update ]; then
test "$($SOURCE_DIR/lib/api/init)" = "127" && slog "sync failed" - "update" && exit;
test $? -ne 0 && exit 127;
rm /home/sats/satsd/source/first_update;
else
test "$($SOURCE_DIR/lib/api/sync)" = "127" && slog "sync failed" - "update" && exit;
test $? -ne 0 && exit 127;
fi;
test $? -ne 0 && exit 127;
# [2] Update source
BRANCH=$(cat $BRANCH_CONF);