custom: rewrite arc patch
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
4
.github/workflows/custom.yml
vendored
4
.github/workflows/custom.yml
vendored
@@ -39,6 +39,7 @@ jobs:
|
||||
MODEL = ''
|
||||
PRODUCTVER = ''
|
||||
ADDONS = ''
|
||||
ARCPATCH = ''
|
||||
MACSYS = ''
|
||||
USBMOUNT = ''
|
||||
CUSTOMKERNEL = ''
|
||||
@@ -48,6 +49,7 @@ jobs:
|
||||
MODEL = jsonbody.get('model', '')
|
||||
PRODUCTVER = jsonbody.get('version', '')
|
||||
ADDONS = jsonbody.get('addons', '')
|
||||
ARCPATCH = jsonbody.get('patch', '')
|
||||
MACSYS = jsonbody.get('macsys', '')
|
||||
USBMOUNT = jsonbody.get('usbmount', '')
|
||||
CUSTOMKERNEL = jsonbody.get('customkernel', '')
|
||||
@@ -58,6 +60,7 @@ jobs:
|
||||
set_output("MODEL", MODEL)
|
||||
set_output("PRODUCTVER", PRODUCTVER)
|
||||
set_output("ADDONS", ADDONS)
|
||||
set_output("ARCPATCH", ARCPATCH)
|
||||
set_output("MACSYS", MACSYS)
|
||||
set_output("USBMOUNT", USBMOUNT)
|
||||
set_output("CUSTOMKERNEL", CUSTOMKERNEL)
|
||||
@@ -147,6 +150,7 @@ jobs:
|
||||
writeConfigKey "model" "${{ env.MODEL }}" "${PRESET_CONFIG_FILE}"
|
||||
writeConfigKey "productver" "${{ env.PRODUCTVER }}" "${PRESET_CONFIG_FILE}"
|
||||
writeConfigKey "arc" "{}" "${PRESET_CONFIG_FILE}"
|
||||
writeConfigKey "arc.patch" "${{ env.ARCPATCH }}" "${PRESET_CONFIG_FILE}"
|
||||
writeConfigKey "arc.macsys" "${{ env.MACSYS }}" "${PRESET_CONFIG_FILE}"
|
||||
writeConfigKey "arc.custom" "true" "${PRESET_CONFIG_FILE}"
|
||||
writeConfigKey "arc.usbmount" "${{ env.USBMOUNT }}" "${PRESET_CONFIG_FILE}"
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
let formData = new FormData(form);
|
||||
var title = "custom";
|
||||
var body = {};
|
||||
var _parameters = ["title", "model", "version", "addons", "macsys", "usbmount", "customkernel", "format"];
|
||||
var _parameters = ["title", "model", "version", "addons", "macsys", "patch", "usbmount", "customkernel", "format"];
|
||||
for (var key in _parameters) {
|
||||
var name = _parameters[key];
|
||||
if (name == "title") {
|
||||
@@ -172,7 +172,6 @@
|
||||
<div class="form-group-body">
|
||||
<p class="form-control input-contrast input-sm">This builds are not stable everytime and have limited features.
|
||||
To get full features and options, use <a href="https://github.com/AuxXxilium/arc">Arc Loader</a>.
|
||||
Arc Patch will be enabled automatically, if available.<br>
|
||||
Please check the <a href="https://github.com/AuxXxilium/AuxXxilium/wiki" target="_blank">Wiki</a> before you start a build.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -214,6 +213,17 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-1 mb-2 ">
|
||||
<div class="form-group-header">
|
||||
<label class="color-fg-default text-mono f6">Arc Patch (Choose an Option):</label>
|
||||
</div>
|
||||
<div class="form-group-body">
|
||||
<select class="form-select form-control select-sm input-contrast" id="patch" name="inputs[patch]" value="">
|
||||
<option selected="selected" value="false">no</option>
|
||||
<option value="true">yes (if available)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-1 mb-2 ">
|
||||
<div class="form-group-header">
|
||||
<label class="color-fg-default text-mono f6">Macsys (Choose an Option):</label>
|
||||
|
||||
@@ -846,12 +846,13 @@ function arcAutomated() {
|
||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
||||
DT="$(readModelKey "${MODEL}" "dt")"
|
||||
ARCCONF="$(readModelKey "${MODEL}" "arc.serial")"
|
||||
ARCPATCHPRE="$(readConfigKey "arc.patch" "${USER_CONFIG_FILE}")"
|
||||
[ -n "${ARCCONF}" ] && ARCPATCH="true" || ARCPATCH="false"
|
||||
if [ "${ARCPATCH}" = "true" ]; then
|
||||
if [[ "${ARCPATCH}" = "true" && "${ARCPATCHPRE}" = "true" ]]; then
|
||||
SN="$(readModelKey "${MODEL}" "arc.serial")"
|
||||
writeConfigKey "arc.sn" "${SN}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}"
|
||||
elif [ "${ARCPATCH}" = "false" ]; then
|
||||
else
|
||||
SN="$(generateSerial "${MODEL}")"
|
||||
writeConfigKey "arc.sn" "${SN}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}"
|
||||
|
||||
Reference in New Issue
Block a user