5
2
mirror of https://github.com/getbible/v2_builder.git synced 2024-11-22 10:45:10 +00:00

Fixed conf path in download python script

This commit is contained in:
Llewellyn van der Merwe 2021-04-20 18:52:27 +02:00
parent 17e47752c7
commit b8aee8200f
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
2 changed files with 5 additions and 3 deletions

3
run.sh
View File

@ -71,7 +71,7 @@ function getModules () {
sleep 1 sleep 1
echo -e "XXX\n0\nStart download of modules... \nXXX" echo -e "XXX\n0\nStart download of modules... \nXXX"
sleep 1 sleep 1
python3 -u "${DIR_src}/download.py" --output_path "${modules_path}" python3 -u "${DIR_src}/download.py" --output_path "${modules_path}" --conf_dir "${DIR_conf}"
sleep 1 sleep 1
echo -e "XXX\n100\nDone downloading modules... \nXXX" echo -e "XXX\n100\nDone downloading modules... \nXXX"
sleep 2 sleep 2
@ -297,6 +297,7 @@ if (( "$SHOWCONF" == 1 )); then
echo "DIR_api: ${DIR_api}" echo "DIR_api: ${DIR_api}"
echo "DIR_zip: ${DIR_zip}" echo "DIR_zip: ${DIR_zip}"
echo "DIR_src: ${DIR_src}" echo "DIR_src: ${DIR_src}"
echo "DIR_conf: ${DIR_conf}"
echo "DOWNLOAD: ${DOWNLOAD}" echo "DOWNLOAD: ${DOWNLOAD}"
echo "PUSH: ${PUSH}" echo "PUSH: ${PUSH}"
exit exit

View File

@ -2,14 +2,15 @@ import os, os.path, json, urllib, urllib.request, sys, zipfile, shutil, argparse
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
# get the arguments # get the arguments
parser.add_argument('--output_path', help='The local path like "V2"', default="V2") parser.add_argument('--output_path', help='The local path like "/home/username/sword_zip"', default="sword_zip")
parser.add_argument('--conf_dir')
# set to args # set to args
args = parser.parse_args() args = parser.parse_args()
# this is a full path # this is a full path
MAIN_PATH = args.output_path MAIN_PATH = args.output_path
# some helper dictionaries # some helper dictionaries
v1_translation_names = json.loads(open("../conf/CrosswireModulesMap.json").read()) v1_translation_names = json.loads(open(args.conf_dir + "/conf/CrosswireModulesMap.json").read())
# scripts directory # scripts directory
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))