diff --git a/compile.sh b/compile.sh index 1b1644e..a5e8a61 100644 --- a/compile.sh +++ b/compile.sh @@ -32,7 +32,7 @@ if [[ "$OSTYPE" == "msys" ]]; then cmake -G "Visual Studio 12 Win64" "..\.." msbuild.exe Bytecoin.sln /property:Configuration=Release ${COMPILE_ARGS} else - make release-static + make release-static ${COMPILE_ARGS} fi if [[ $? == "0" ]]; then diff --git a/extensions/aeon.json b/extensions/aeon.json index 6e6db04..578dbb7 100644 --- a/extensions/aeon.json +++ b/extensions/aeon.json @@ -468,6 +468,18 @@ "path": "/src/blocks/blocks.dat", "action": "add", "source": "/aeon/files/blocks.dat" + }, + { + "action": "bulk_replace", + "find": "monerod", + "replace": "aeond", + "file_pattern": "*" + }, + { + "action": "bulk_replace", + "find": "monero-", + "replace": "aeon-", + "file_pattern": "*" } ] } diff --git a/generator.sh b/generator.sh index 5ebb09b..e2c7761 100644 --- a/generator.sh +++ b/generator.sh @@ -27,7 +27,7 @@ function finish { } trap finish EXIT -# Generate source code and compile +# Generate source code and compile function generate_coin { # Define coin paths export BASE_COIN_PATH="${WORK_FOLDERS_PATH}/${__CONFIG_base_coin_name}" @@ -80,7 +80,7 @@ function generate_coin { cd "${NEW_COIN_PATH}" && patch -s -p1 < "${UPDATES_PATH}" && cd "${SCRIPTS_PATH}" chmod -R 755 ${NEW_COIN_PATH} cp ${TEMP_PATH}/src/blocks/* ${NEW_COIN_PATH}/src/blocks - + bash "${SCRIPTS_PATH}/compile.sh" -c "${COMPILE_ARGS}" -z fi } @@ -95,7 +95,7 @@ Reads a config file and creates and compiles Cryptonote coin. "config.json" as d -f config file -c compile arguments EOF -} +} # A POSIX variable OPTIND=1 # Reset in case getopts has been used previously in the shell. @@ -125,7 +125,7 @@ if [[ "${CONFIG_FILE}" != /* ]]; then fi if [ ! -f ${CONFIG_FILE} ]; then - echo "ERROR: config file does not exits" + echo "ERROR: config file does not exits" exit fi diff --git a/lib/file-modification.py b/lib/file-modification.py index c3718e0..b1c550a 100644 --- a/lib/file-modification.py +++ b/lib/file-modification.py @@ -41,7 +41,6 @@ def findReplace(directory, find, replace, filePattern): s = s.decode('utf-8', errors='ignore').encode('utf-8').replace(find, replace) with open(filepath, "w") as f: f.write(s) - os.chmod(filepath, int(str(oct(stats.st_mode))[3:], 8)) def text_creator(change): replace_text = '' @@ -125,6 +124,7 @@ if not (set(required_extensions) <= set(loaded_extensions)): for file in extension['files']: # Bulk replace text + if 'action' in file.keys() and file['action'] == 'bulk_replace': if 'find' in file.keys() and 'replace' in file.keys() and 'file_pattern' in file.keys(): sys.__stdout__.write("- Bulk replacing " + file['find'] + " with " + file['replace'] + "\n") diff --git a/vars.cfg b/vars.cfg index 17618a2..a957dd0 100644 --- a/vars.cfg +++ b/vars.cfg @@ -5,7 +5,7 @@ export EXTENSIONS_PATH="${SCRIPTS_PATH}/extensions" export TESTS_PATH="${SCRIPTS_PATH}/tests" export CONFIG_PATH="${SCRIPTS_PATH}" export TEMP_PATH="${WORK_FOLDERS_PATH}/tmp" -export UPDATES_PATH="${WORK_FOLDERS_PATH}/updates.dashcoin.patch" +export UPDATES_PATH="${WORK_FOLDERS_PATH}/updates.forknote.monero.patch" export BASH_CONFIG="${WORK_FOLDERS_PATH}/config.cfg" export CUSTOM_CUSTOMIZE_SCRIPT_PATH="${SCRIPTS_PATH}/custom/customize.sh"