From f0c993f6eb252b49ad46363cdc92fd08516ffca1 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Thu, 10 Aug 2023 11:49:27 +0900 Subject: [PATCH] Tweak scripts --- main.sh | 4 ++-- tools/ci/manifest.sh | 2 +- tools/ci/tool-list.sh | 2 +- tools/manifest.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.sh b/main.sh index c32ada62..f243f483 100755 --- a/main.sh +++ b/main.sh @@ -350,14 +350,14 @@ case "$(uname -s)" in Linux) host_os=linux if grep -q '^ID_LIKE=' /etc/os-release; then - base_distro="$(grep '^ID_LIKE=' /etc/os-release | sed 's/^ID_LIKE=//')" + base_distro=$(grep '^ID_LIKE=' /etc/os-release | sed 's/^ID_LIKE=//') case "${base_distro}" in *debian*) base_distro=debian ;; *alpine*) base_distro=alpine ;; *fedora*) base_distro=fedora ;; esac else - base_distro="$(grep '^ID=' /etc/os-release | sed 's/^ID=//')" + base_distro=$(grep '^ID=' /etc/os-release | sed 's/^ID=//') fi case "${base_distro}" in fedora) diff --git a/tools/ci/manifest.sh b/tools/ci/manifest.sh index 342bfe51..388eabb4 100755 --- a/tools/ci/manifest.sh +++ b/tools/ci/manifest.sh @@ -21,7 +21,7 @@ set -x for manifest in manifests/*.json; do git add -N "${manifest}" if ! git diff --exit-code -- "${manifest}"; then - name="$(basename "${manifest%.*}")" + name=$(basename "${manifest%.*}") git stash old_version=$(jq -r '.latest.version' "${manifest}") git stash pop diff --git a/tools/ci/tool-list.sh b/tools/ci/tool-list.sh index 8b32a203..b4833f3f 100755 --- a/tools/ci/tool-list.sh +++ b/tools/ci/tool-list.sh @@ -80,7 +80,7 @@ for manifest in tools/codegen/base/*.json; do esac if [[ -n "${tool_name}" ]]; then if [[ "${version}" != "latest" ]]; then - latest_version="$(jq -r ".latest.version" "manifests/${tool_name}.json")" + latest_version=$(jq -r ".latest.version" "manifests/${tool_name}.json") case "${version}" in major.minor.patch) tool_name+="@${latest_version}" ;; major.minor) tool_name+="@${latest_version%.*}" ;; diff --git a/tools/manifest.sh b/tools/manifest.sh index 9fd588f4..06e6da0e 100755 --- a/tools/manifest.sh +++ b/tools/manifest.sh @@ -15,6 +15,6 @@ if [[ $# -gt 0 ]]; then fi for manifest in tools/codegen/base/*.json; do - package="$(basename "${manifest%.*}")" + package=$(basename "${manifest%.*}") cargo run --release -p install-action-internal-codegen -- "${package}" latest done