1 # -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
3 # Copyright (c) 2015, Thibault Saunier <thibault.saunier@collabora.com>
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this program; if not, write to the
17 # Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 # Boston, MA 02110-1301, USA.
22 from launcher import utils
24 SYNC_ASSETS_COMMAND = "git fetch origin && git checkout origin/master && git annex get ."
26 def update_assets(assets_dir):
28 utils.launch_command("cd %s && %s" % (assets_dir, SYNC_ASSETS_COMMAND),
31 except subprocess.CalledProcessError as e:
32 utils.printc("Could not update assets repository\n\nError: %s"
33 "\n\nMAKE SURE YOU HAVE git-annex INSTALLED!" % (e),
34 utils.Colors.FAIL, True)