Commits

Henrik Tunedal  committed 5f8de5d

Moved configuration to config.py.

  • Participants
  • Parent commits eadf62a

Comments (0)

Files changed (2)

File check_license.py

 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-source_root = "/data/misc/fdroidbuild"
-metadata_root = "/home/henrik/src/fdroidserver/metadata"
-
 import os, subprocess, argparse, shutil, sys, re
 
+# Read the configuration file
+try:
+    from config import source_root, metadata_root
+except ImportError:
+    print >>sys.stderr, \
+        "Please define source_root and metadata_root in config.py first."
+    sys.exit(1)
 
 ##############################################
 # Functions to clone and handle repositories #
         ["the terms of the GNU General Public License",
          "Free Software",
          "either version 3 of the License",
-         "or (at your option) any later"])
+         "(at your option) any later"])
 
 def file_is_apache2(filename):
     data = open(filename, "r").read(8192)

File config.sample.py

 keyaliases = {}
 keyaliases['com.example.app'] = 'example'
 
-
+# For check_license.py
+source_root = "/somewhere/fdroid-build-dir"
+metadata_root = "/somewhere/src/fdroidserver/metadata"