1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00
apps/should_i_rebuild.sh
2017-02-14 14:57:50 +01:00

30 lines
594 B
Bash

#!/bin/bash
set -ex
if [ ! "$1" ]
then
echo "I need a github <username>:<token> to run as first argument"
exit 1
fi
before_official=$(sha256sum official.json)
before_community=$(sha256sum community.json)
before_dev=$(sha256sum dev.json)
git pull
if [ "$before_official" != "$(sha256sum official.json)" ]
then
python ./list_builder.py -g $1 official.json
fi
if [ "$before_community" != "$(sha256sum community.json)" ]
then
python ./list_builder.py -g $1 community.json
fi
if [ "$before_dev" != "$(sha256sum dev.json)" ]
then
python ./list_builder.py -g $1 dev.json
fi