1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-05 15:00:11 +01:00

Merge commit 'refs/merge-requests/11' of git://gitorious.org/f-droid/fdroidserver

This commit is contained in:
Ciaran Gultnieks 2011-02-17 22:20:27 +00:00
commit 797596c4a6
6 changed files with 21 additions and 11 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ repo/
built/
build_*/
*~
*.pyc

7
build.py Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# build.py - part of the FDroid server tools
@ -19,7 +20,6 @@
import sys
import os
import shutil
import glob
import subprocess
import re
import zipfile
@ -29,10 +29,11 @@ import shlex
from xml.dom.minidom import Document
from optparse import OptionParser
import common
#Read configuration...
execfile('config.py')
execfile('metadata.py')
# Parse command line...
parser = OptionParser()
@ -45,7 +46,7 @@ parser.add_option("-c", "--clean", action="store_true", default=False,
(options, args) = parser.parse_args()
# Get all apps...
apps = read_metadata()
apps = common.read_metadata()
#Clear and/or create the 'built' directory, depending on mode:
built_dir = 'built'

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# metadata.py - part of the FDroid server tools
# common.py - part of the FDroid server tools
# Copyright (C) 2010, Ciaran Gultnieks, ciaran@ciarang.com
#
# This program is free software: you can redistribute it and/or modify
@ -16,6 +16,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import glob, os, sys
def read_metadata(verbose=False):
apps = []

View File

@ -103,10 +103,13 @@ class test {
if (changed) {
System.out.println("..updating");
File of = new File(filespec);
BufferedWriter wi = new BufferedWriter(new FileWriter(of));
FileOutputStream fo = new FileOutputStream(filespec);
OutputStreamWriter osr = new OutputStreamWriter(fo, "UTF-8");
BufferedWriter wi = new BufferedWriter(osr);
wi.write(output.toString());
wi.close();
osr.close();
fo.close();
}
}

View File

@ -4,7 +4,7 @@ Web Site:http://learnmusicnotes.sourceforge.net/
Source Code:http://learnmusicnotes.sourceforge.net/
Issue Tracker:http://sourceforge.net/tracker/?group_id=371992
Donate:
Summary:Musi sight reading training game
Summary:Music sight reading training game
Description:
A simple game to assist with music sight reading training.
.

11
update.py Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# update.py - part of the FDroid server tools
@ -34,7 +35,7 @@ repo_icon = None
repo_url = None
execfile('config.py')
execfile('metadata.py')
import common
# Parse command line...
parser = OptionParser()
@ -66,7 +67,7 @@ if (repo_url is None or repo_name is None or
sys.exit(1)
# Get all apps...
apps = read_metadata(verbose=options.verbose)
apps = common.read_metadata(verbose=options.verbose)
# Copy apks and source tarballs for stuff we've built from source that
# is flagged to be included in the repo...
@ -150,8 +151,10 @@ for apkfile in glob.glob(os.path.join('repo','*.apk')):
f.close()
# Get the signature (or md5 of, to be precise)...
p = subprocess.Popen(['java', 'getsig', os.path.join('..', apkfile)]
, cwd='getsig', stdout=subprocess.PIPE)
p = subprocess.Popen(['java', 'getsig',
os.path.join(os.getcwd(), apkfile)],
cwd=os.path.join(sys.path[0], 'getsig'),
stdout=subprocess.PIPE)
output = p.communicate()[0]
if options.verbose:
print output