mirror of
https://github.com/AuxXxilium/arc-v.git
synced 2024-11-23 15:01:04 +07:00
tree: multiple rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
f2d8a4ab0f
commit
c75350f32b
@ -54,12 +54,12 @@ function installAddon() {
|
||||
HAS_FILES=0
|
||||
# First check generic files
|
||||
if [ -f "${ADDONS_PATH}/${ADDON}/all.tgz" ]; then
|
||||
tar -zxf "${ADDONS_PATH}/${ADDON}/all.tgz" -C "${TMP_PATH}/${ADDON}"
|
||||
tar zxf "${ADDONS_PATH}/${ADDON}/all.tgz" -C "${TMP_PATH}/${ADDON}"
|
||||
HAS_FILES=1
|
||||
fi
|
||||
# Now check specific platform files
|
||||
if [ -f "${ADDONS_PATH}/${ADDON}/${PLATFORM}-${KVER}.tgz" ]; then
|
||||
tar -zxf "${ADDONS_PATH}/${ADDON}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/${ADDON}"
|
||||
tar zxf "${ADDONS_PATH}/${ADDON}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/${ADDON}"
|
||||
HAS_FILES=1
|
||||
fi
|
||||
# If has files to copy, copy it, else return error
|
||||
@ -82,7 +82,7 @@ function untarAddon() {
|
||||
fi
|
||||
rm -rf "${TMP_PATH}/${ADDON:?}"
|
||||
mkdir -p "${TMP_PATH}/${ADDON}"
|
||||
tar -xaf "${1}" -C "${TMP_PATH}/${ADDON}" || return
|
||||
tar xaf "${1}" -C "${TMP_PATH}/${ADDON}" || return
|
||||
ADDON=$(readConfigKey "name" "${TMP_PATH}/${ADDON}/manifest.yml")
|
||||
[ -z "${ADDON}" ] && return
|
||||
rm -rf "${ADDONS_PATH}/${ADDON:?}"
|
||||
@ -97,8 +97,8 @@ function updateAddons() {
|
||||
ADDON=$(basename "${F}" | sed 's|.addon||')
|
||||
rm -rf "${ADDONS_PATH}/${ADDON:?}"
|
||||
mkdir -p "${ADDONS_PATH}/${ADDON}"
|
||||
echo "Installing ${F} to ${ADDONS_PATH}/${ADDON}"
|
||||
tar -xaf "${F}" -C "${ADDONS_PATH}/${ADDON}"
|
||||
echo "Installing ${F} to ${ADDONS_PATH}/${ADDON}" 2>"${LOG_FILE}" || dieLog
|
||||
tar xaf "${F}" -C "${ADDONS_PATH}/${ADDON}"
|
||||
rm -f "${F}"
|
||||
done
|
||||
}
|
@ -13,7 +13,7 @@ function getAllModules() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
tar zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
# Get list of all modules
|
||||
for F in $(ls ${TMP_PATH}/modules/*.ko); do
|
||||
X=$(basename ${F})
|
||||
@ -41,9 +41,9 @@ function addToModules() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
tar zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
cp -f ${KOFILE} ${TMP_PATH}/modules
|
||||
tar -zcf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" .
|
||||
tar zcf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" .
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
@ -62,9 +62,9 @@ function delToModules() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
tar zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
rm -f ${TMP_PATH}/modules/${KONAME}
|
||||
tar -zcf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" .
|
||||
tar zcf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules" .
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
@ -94,7 +94,7 @@ function getdepends() {
|
||||
# Unzip modules for temporary folder
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
mkdir -p "${TMP_PATH}/modules"
|
||||
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
tar zxf "${MODULES_PATH}/${PLATFORM}-${KVER}.tgz" -C "${TMP_PATH}/modules"
|
||||
DPS=($(_getdepends ${KONAME} | tr ' ' '\n' | sort -u))
|
||||
echo ${DPS[@]}
|
||||
rm -rf "${TMP_PATH}/modules"
|
||||
|
@ -4,6 +4,7 @@ set -e
|
||||
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||
|
||||
. ${ARC_PATH}/include/functions.sh
|
||||
. ${ARC_PATH}/include/addons.sh
|
||||
|
||||
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user