mirror of
https://github.com/RROrg/rr.git
synced 2025-09-01 01:17:28 +08:00
Compare commits
6 Commits
b692f27ea7
...
16b6a486de
Author | SHA1 | Date | |
---|---|---|---|
|
16b6a486de | ||
|
f6260a1c99 | ||
|
5bb1930a5a | ||
|
22852b009a | ||
|
87d690b92c | ||
|
723936afd8 |
BIN
docs/addons.xlsx
BIN
docs/addons.xlsx
Binary file not shown.
BIN
docs/models.xlsx
BIN
docs/models.xlsx
Binary file not shown.
Binary file not shown.
BIN
docs/pats.xlsx
BIN
docs/pats.xlsx
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
RR_VERSION="25.5.5"
|
||||
RR_VERSION="25.5.6"
|
||||
RR_RELEASE=""
|
||||
RR_TITLE="RR v${RR_VERSION}"
|
||||
|
||||
|
@ -23,10 +23,10 @@ function checkBootLoader() {
|
||||
[ ! -w "${PART1_PATH}" ] && return 1
|
||||
[ ! -w "${PART2_PATH}" ] && return 1
|
||||
[ ! -w "${PART3_PATH}" ] && return 1
|
||||
type -p awk || return 1
|
||||
type -p cut || return 1
|
||||
type -p sed || return 1
|
||||
type -p tar || return 1
|
||||
type awk >/dev/null 2>&1 || return 1
|
||||
type cut >/dev/null 2>&1 || return 1
|
||||
type sed >/dev/null 2>&1 || return 1
|
||||
type tar >/dev/null 2>&1 || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ function _set_conf_kv() {
|
||||
# @ - url list
|
||||
function _get_fastest() {
|
||||
local speedlist=""
|
||||
if type -p ping; then
|
||||
if type ping >/dev/null 2>&1; then
|
||||
for I in "$@"; do
|
||||
speed=$(LC_ALL=C ping -c 1 -W 5 "${I}" 2>/dev/null | awk -F'[= ]' '/time=/ {for(i=1;i<=NF;i++) if ($i=="time") print $(i+1)}')
|
||||
speedlist+="${I} ${speed:-999}\n" # Assign default value 999 if speed is empty
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
[ -z "${WORK_PATH}" ] || [ ! -d "${WORK_PATH}/include" ] && WORK_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" >/dev/null 2>&1 && pwd)"
|
||||
|
||||
type -p gettext && alias TEXT='gettext "rr"' || alias TEXT='echo'
|
||||
type gettext >/dev/null 2>&1 && alias TEXT='gettext "rr"' || alias TEXT='echo'
|
||||
shopt -s expand_aliases
|
||||
|
||||
[ -d "${WORK_PATH}/lang" ] && export TEXTDOMAINDIR="${WORK_PATH}/lang"
|
||||
|
@ -1 +1 @@
|
||||
25.5.5
|
||||
25.5.6
|
||||
|
@ -39,7 +39,7 @@ function create() {
|
||||
sudo apt install -y locales busybox dialog gettext sed gawk jq curl
|
||||
sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils dosfstools cpio xz-utils lz4 lzma bzip2 gzip zstd
|
||||
# sudo snap install yq
|
||||
if ! type -p yq || ! yq --version 2>/dev/null | grep -q "v4."; then
|
||||
if ! type yq >/dev/null 2>&1 || ! yq --version 2>/dev/null | grep -q "v4."; then
|
||||
sudo curl -kL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && sudo chmod a+x /usr/bin/yq
|
||||
fi
|
||||
|
||||
@ -239,11 +239,12 @@ function resize() {
|
||||
|
||||
sudo truncate -s ${SIZE}M "${OUTPUT_FILE}"
|
||||
echo -e "d\n\nn\n\n\n\n\nn\nw" | sudo fdisk "${OUTPUT_FILE}" >/dev/null 2>&1
|
||||
local LOOPX
|
||||
local LOOPX LOOPXPY
|
||||
LOOPX=$(sudo losetup -f)
|
||||
sudo losetup -P "${LOOPX}" "${OUTPUT_FILE}"
|
||||
sudo e2fsck -fp "$(find "${LOOPX}p"* -maxdepth 0 2>/dev/null | sort -n | tail -1)"
|
||||
sudo resize2fs "$(find "${LOOPX}p"* -maxdepth 0 2>/dev/null | sort -n | tail -1)"
|
||||
LOOPXPY="$(find "${LOOPX}p"* -maxdepth 0 2>/dev/null | sort -n | tail -1)"
|
||||
sudo e2fsck -fp "${LOOPXPY:-${LOOPX}p3}"
|
||||
sudo resize2fs "${LOOPXPY:-${LOOPX}p3}"
|
||||
sudo losetup -d "${LOOPX}"
|
||||
}
|
||||
|
||||
|
@ -314,11 +314,12 @@ function resizeImg() {
|
||||
|
||||
sudo truncate -s ${SIZE}M "${OUTPUT_FILE}"
|
||||
echo -e "d\n\nn\n\n\n\n\nn\nw" | sudo fdisk "${OUTPUT_FILE}" >/dev/null 2>&1
|
||||
local LOOPX
|
||||
local LOOPX LOOPXPY
|
||||
LOOPX=$(sudo losetup -f)
|
||||
sudo losetup -P "${LOOPX}" "${OUTPUT_FILE}"
|
||||
sudo e2fsck -fp "$(find "${LOOPX}p"* -maxdepth 0 2>/dev/null | sort -n | tail -1)"
|
||||
sudo resize2fs "$(find "${LOOPX}p"* -maxdepth 0 2>/dev/null | sort -n | tail -1)"
|
||||
LOOPXPY="$(find "${LOOPX}p"* -maxdepth 0 2>/dev/null | sort -n | tail -1)"
|
||||
sudo e2fsck -fp "${LOOPXPY:-${LOOPX}p3}"
|
||||
sudo resize2fs "${LOOPXPY:-${LOOPX}p3}"
|
||||
sudo losetup -d "${LOOPX}"
|
||||
}
|
||||
|
||||
@ -329,7 +330,7 @@ function createvmx() {
|
||||
local BLIMAGE=${1}
|
||||
local VMNAME=${2}
|
||||
|
||||
if ! type -p qemu-img; then
|
||||
if ! type qemu-img >/dev/null 2>&1; then
|
||||
sudo apt install -y qemu-utils
|
||||
fi
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
# sudo apt install -y locales busybox dialog gettext sed gawk jq curl
|
||||
# sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils dosfstools cpio xz-utils lz4 lzma bzip2 gzip zstd
|
||||
# # sudo snap install yq
|
||||
# if ! type -p yq || ! yq --version 2>/dev/null | grep -q "v4."; then
|
||||
# if ! type yq >/dev/null 2>&1 || ! yq --version 2>/dev/null | grep -q "v4."; then
|
||||
# sudo curl -kL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && sudo chmod a+x /usr/bin/yq
|
||||
# fi
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user