mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
统一 grep 命令的参数
This commit is contained in:
parent
3b1e4ff40b
commit
c3ae869c42
2
.github/workflows/data.yml
vendored
2
.github/workflows/data.yml
vendored
@ -45,7 +45,7 @@ jobs:
|
|||||||
|
|
||||||
TAG=""
|
TAG=""
|
||||||
if [ "${PRERELEASE}" = "true" ]; then
|
if [ "${PRERELEASE}" = "true" ]; then
|
||||||
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | sed -E 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep "/refs/tags/.*\.zip" | sed -E 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
||||||
else
|
else
|
||||||
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
||||||
TAG="${LATESTURL##*/}"
|
TAG="${LATESTURL##*/}"
|
||||||
|
2
.github/workflows/issues.yml
vendored
2
.github/workflows/issues.yml
vendored
@ -182,7 +182,7 @@ jobs:
|
|||||||
|
|
||||||
TAG=""
|
TAG=""
|
||||||
if [ "${PRERELEASE}" = "true" ]; then
|
if [ "${PRERELEASE}" = "true" ]; then
|
||||||
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | sed -E 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep "/refs/tags/.*\.zip" | sed -E 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
||||||
else
|
else
|
||||||
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
||||||
TAG="${LATESTURL##*/}"
|
TAG="${LATESTURL##*/}"
|
||||||
|
@ -398,7 +398,7 @@ function checkBIOS_VT_d() {
|
|||||||
# 1 - mode
|
# 1 - mode
|
||||||
function rebootTo() {
|
function rebootTo() {
|
||||||
local MODES="config recovery junior bios memtest"
|
local MODES="config recovery junior bios memtest"
|
||||||
if [ -z "${1}" ] || ! echo "${MODES}" | grep -qw "${1}"; then exit 1; fi
|
if [ -z "${1}" ] || ! echo "${MODES}" | grep -wq "${1}"; then exit 1; fi
|
||||||
# echo "Rebooting to ${1} mode"
|
# echo "Rebooting to ${1} mode"
|
||||||
GRUBPATH="$(dirname "$(find "${PART1_PATH}/" -name grub.cfg 2>/dev/null | head -1)")"
|
GRUBPATH="$(dirname "$(find "${PART1_PATH}/" -name grub.cfg 2>/dev/null | head -1)")"
|
||||||
[ -z "${GRUBPATH}" ] && exit 1
|
[ -z "${GRUBPATH}" ] && exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user