GitHubのミラーです
https://github.com/FascodeNet/alterlinux
Revision | be87a5204cfa0552c631c31f22e63803bce58a75 (tree) |
---|---|
Time | 2021-05-22 23:32:35 |
Author | hayao <hayao@fasc...> |
Commiter | hayao |
Merge branch 'dev' into dev-stable
@@ -1,71 +0,0 @@ | ||
1 | -# For most projects, this workflow file will not need changing; you simply need | |
2 | -# to commit it to your repository. | |
3 | -# | |
4 | -# You may wish to alter this file to override the set of languages analyzed, | |
5 | -# or to provide custom queries or build logic. | |
6 | -name: "CodeQL" | |
7 | - | |
8 | -on: | |
9 | - push: | |
10 | - branches: [dev, dev-stable, master] | |
11 | - pull_request: | |
12 | - # The branches below must be a subset of the branches above | |
13 | - branches: [dev] | |
14 | - schedule: | |
15 | - - cron: '0 17 * * 2' | |
16 | - | |
17 | -jobs: | |
18 | - analyze: | |
19 | - name: Analyze | |
20 | - runs-on: ubuntu-latest | |
21 | - | |
22 | - strategy: | |
23 | - fail-fast: false | |
24 | - matrix: | |
25 | - # Override automatic language detection by changing the below list | |
26 | - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] | |
27 | - language: ['cpp', 'python'] | |
28 | - # Learn more... | |
29 | - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection | |
30 | - | |
31 | - steps: | |
32 | - - name: Checkout repository | |
33 | - uses: actions/checkout@v2 | |
34 | - with: | |
35 | - # We must fetch at least the immediate parents so that if this is | |
36 | - # a pull request then we can checkout the head. | |
37 | - fetch-depth: 2 | |
38 | - | |
39 | - # If this run was triggered by a pull request event, then checkout | |
40 | - # the head of the pull request instead of the merge commit. | |
41 | - - run: git checkout HEAD^2 | |
42 | - if: ${{ github.event_name == 'pull_request' }} | |
43 | - | |
44 | - # Initializes the CodeQL tools for scanning. | |
45 | - - name: Initialize CodeQL | |
46 | - uses: github/codeql-action/init@v1 | |
47 | - with: | |
48 | - languages: ${{ matrix.language }} | |
49 | - # If you wish to specify custom queries, you can do so here or in a config file. | |
50 | - # By default, queries listed here will override any specified in a config file. | |
51 | - # Prefix the list here with "+" to use these queries and those in the config file. | |
52 | - # queries: ./path/to/local/query, your-org/your-repo/queries@main | |
53 | - | |
54 | - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | |
55 | - # If this step fails, then you should remove it and run the build manually (see below) | |
56 | - - name: Autobuild | |
57 | - uses: github/codeql-action/autobuild@v1 | |
58 | - | |
59 | - # ℹ️ Command-line programs to run using the OS shell. | |
60 | - # 📚 https://git.io/JvXDl | |
61 | - | |
62 | - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | |
63 | - # and modify them (or add more) to build your code if your project | |
64 | - # uses a compiled language | |
65 | - | |
66 | - #- run: | | |
67 | - # make bootstrap | |
68 | - # make release | |
69 | - | |
70 | - - name: Perform CodeQL Analysis | |
71 | - uses: github/codeql-action/analyze@v1 |
@@ -1,35 +0,0 @@ | ||
1 | -# This workflow requires that you have an existing account with codescan.io | |
2 | -# For more information about configuring your workflow, | |
3 | -# read our documentation at https://github.com/codescan-io/codescan-scanner-action | |
4 | -name: CodeScan | |
5 | - | |
6 | -on: | |
7 | - push: | |
8 | - branches: [master, main] | |
9 | - pull_request: | |
10 | - # The branches below must be a subset of the branches above | |
11 | - branches: [master, main] | |
12 | - | |
13 | -jobs: | |
14 | - CodeScan: | |
15 | - runs-on: ubuntu-latest | |
16 | - steps: | |
17 | - - name: Checkout repository | |
18 | - uses: actions/checkout@v2 | |
19 | - - name: Cache files | |
20 | - uses: actions/cache@v2 | |
21 | - with: | |
22 | - path: | | |
23 | - ~/.sonar | |
24 | - key: ${{ runner.os }}-sonar | |
25 | - restore-keys: ${{ runner.os }}-sonar | |
26 | - - name: Run Analysis | |
27 | - uses: codescan-io/codescan-scanner-action@master | |
28 | - with: | |
29 | - login: ${{ secrets.CODESCAN_AUTH_TOKEN }} | |
30 | - organization: ${{ secrets.CODESCAN_ORGANIZATION_KEY }} | |
31 | - projectKey: ${{ secrets.CODESCAN_PROJECT_KEY }} | |
32 | - - name: Upload SARIF file | |
33 | - uses: github/codeql-action/upload-sarif@v1 | |
34 | - with: | |
35 | - sarif_file: codescan.sarif |
@@ -0,0 +1,34 @@ | ||
1 | +# This is a basic workflow to help you get started with Actions | |
2 | + | |
3 | +name: ShellCheck CL | |
4 | + | |
5 | +# Controls when the action will run. | |
6 | +on: | |
7 | + # Triggers the workflow on push or pull request events but only for the dev branch | |
8 | + push: | |
9 | + branches: [ dev ] | |
10 | + pull_request: | |
11 | + branches: [ dev ] | |
12 | + | |
13 | + # Allows you to run this workflow manually from the Actions tab | |
14 | + workflow_dispatch: | |
15 | + | |
16 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
17 | +jobs: | |
18 | + # This workflow contains a single job called "build" | |
19 | + build: | |
20 | + # The type of runner that the job will run on | |
21 | + runs-on: ubuntu-latest | |
22 | + | |
23 | + # Steps represent a sequence of tasks that will be executed as part of the job | |
24 | + steps: | |
25 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
26 | + - uses: actions/checkout@v2 | |
27 | + | |
28 | + # Runs a single command using the runners shell | |
29 | + - name: Run ShellCheck | |
30 | + uses: ludeeus/action-shellcheck@master | |
31 | + with: | |
32 | + severity: error | |
33 | + env: | |
34 | + SHELLCHECK_OPTS: --shell=bash |
@@ -1,15 +0,0 @@ | ||
1 | -language: shell | |
2 | -sudo: required | |
3 | -addons: | |
4 | - apt: | |
5 | - packages: | |
6 | - - ninja | |
7 | - - cmake | |
8 | - - clang | |
9 | - - qtbase5-dev | |
10 | -script: | |
11 | - - bash -c 'shopt -s globstar nullglob; shellcheck -s bash --exclude=SC2068 -S error **/*.{sh,ksh,bash}' | |
12 | - - bash -c 'shopt -s globstar nullglob; shellcheck -s bash --exclude=SC2068 -S error tools/*.{sh,ksh,bash}' | |
13 | -git: | |
14 | - submodules: false | |
15 | - language: bash |
@@ -32,7 +32,7 @@ alteriso_version="3.1" | ||
32 | 32 | # Load config file |
33 | 33 | [[ ! -f "${defaultconfig}" ]] && "${tools_dir}/msg.sh" -a 'build.sh' error "${defaultconfig} was not found." && exit 1 |
34 | 34 | for config in "${defaultconfig}" "${script_path}/custom.conf"; do |
35 | - [[ -f "${script_path}/${config}.conf" ]] && source "${script_path}/${config}.conf" | |
35 | + [[ -f "${config}" ]] && source "${config}" | |
36 | 36 | done |
37 | 37 | |
38 | 38 | umask 0022 |
@@ -424,7 +424,7 @@ prepare_build() { | ||
424 | 424 | local module_check |
425 | 425 | module_check(){ |
426 | 426 | msg_debug "Checking ${1} module ..." |
427 | - ! bash "${tools_dir}/module.sh" check "${1}" && msg_error "Module ${1} is not available." "1"; | |
427 | + bash "${tools_dir}/module.sh" check "${1}" || msg_error "Module ${1} is not available." "1"; | |
428 | 428 | } |
429 | 429 | modules=($(printf "%s\n" "${modules[@]}" | awk '!a[$0]++')) |
430 | 430 | for_module "module_check {}" |
@@ -600,10 +600,10 @@ make_pkgbuild() { | ||
600 | 600 | # Customize installation (airootfs) |
601 | 601 | make_customize_airootfs() { |
602 | 602 | # Overwrite airootfs with customize_airootfs. |
603 | - local _airootfs _airootfs_script_options _script _script_list _airootfs_list _main_script | |
603 | + local _airootfs _airootfs_script_options _script _script_list _airootfs_list=() _main_script | |
604 | 604 | |
605 | - _airootfs_list=("${channel_dir}/airootfs.any" "${channel_dir}/airootfs.${arch}") | |
606 | - for_module '_airootfs_list=("${_airootfs_list[@]}" "${module_dir}/{}/airootfs.any" "${module_dir}/{}/airootfs.${arch}")' | |
605 | + for_module '_airootfs_list+=("${module_dir}/{}/airootfs.any" "${module_dir}/{}/airootfs.${arch}")' | |
606 | + _airootfs_list+=("${channel_dir}/airootfs.any" "${channel_dir}/airootfs.${arch}") | |
607 | 607 | |
608 | 608 | for _airootfs in "${_airootfs_list[@]}";do |
609 | 609 | if [[ -d "${_airootfs}" ]]; then |
@@ -0,0 +1,2 @@ | ||
1 | +[Seat:*] | |
2 | +autologin-session=cinnamon2d |
@@ -0,0 +1,2 @@ | ||
1 | +[Seat:*] | |
2 | +autologin-session=i3 |
@@ -22,7 +22,7 @@ declare -A menu_list=( | ||
22 | 22 | |
23 | 23 | function main() { |
24 | 24 | local -r IFS=$'\n' |
25 | - [[ $# -ne 0 ]] && eval "${menu_list[$1]}" || echo "${!menu_list[*]}" | |
25 | + [[ "${#}" -ne 0 ]] && eval "${menu_list[$1]}" || echo "${!menu_list[*]}" | |
26 | 26 | } |
27 | 27 | |
28 | -main $@ | |
28 | +main "${@}" |
@@ -20,7 +20,7 @@ sed -i "s|%USERNAME%|${username}|g" "/etc/lightdm/lightdm.conf.d/02-autologin.co | ||
20 | 20 | |
21 | 21 | |
22 | 22 | # Session list |
23 | -if cat "/etc/lightdm/lightdm.conf.d/02-autologin-session.conf" | grep "%SESSION%" 1> /dev/null 2>&1; then | |
23 | +if [[ -f "/etc/lightdm/lightdm.conf.d/02-autologin-session.conf" ]] && cat "/etc/lightdm/lightdm.conf.d/02-autologin-session.conf" | grep "%SESSION%" 1> /dev/null 2>&1; then | |
24 | 24 | session_list=() |
25 | 25 | while read -r session; do |
26 | 26 | session_list+=("${session}") |
@@ -32,6 +32,10 @@ if cat "/etc/lightdm/lightdm.conf.d/02-autologin-session.conf" | grep "%SESSION% | ||
32 | 32 | elif (( "${#session_list[@]}" == 0)); then |
33 | 33 | echo "Warining: Auto login session was not found" |
34 | 34 | else |
35 | - remove "/etc/lightdm/lightdm.conf.d/02-autologin-session.conf" | |
35 | + echo "Failed to set the session.Multiple sessions were found." >&2 | |
36 | + echo "Please set the session of automatic login in /etc/lightdm/lightdm.conf.d/02-autologin-session.conf" | |
37 | + echo "Found session: $(printf "%s " "${session_list[@]}")" | |
38 | + sleep 0.5 | |
39 | + exit 1 | |
36 | 40 | fi |
37 | 41 | fi |
@@ -9,7 +9,7 @@ | ||
9 | 9 | set -e -u |
10 | 10 | |
11 | 11 | aur_username="aurbuild" |
12 | -pacman_debug=true | |
12 | +pacman_debug=false | |
13 | 13 | pacman_args=() |
14 | 14 | |
15 | 15 | trap 'exit 1' 1 2 3 15 |
@@ -9,7 +9,7 @@ | ||
9 | 9 | set -e |
10 | 10 | |
11 | 11 | build_username="pkgbuild" |
12 | -pacman_debug=true | |
12 | +pacman_debug=false | |
13 | 13 | pacman_args=() |
14 | 14 | |
15 | 15 | _help() { |
@@ -66,7 +66,7 @@ function user_check () { | ||
66 | 66 | |
67 | 67 | # 一般ユーザーで実行します |
68 | 68 | function run_user () { |
69 | - sudo -u "${build_username}" ${@} | |
69 | + sudo -u "${build_username}" "${@}" | |
70 | 70 | } |
71 | 71 | |
72 | 72 | # 引数を確認 |
@@ -106,12 +106,12 @@ pacman -Syy "${pacman_args[@]}" | ||
106 | 106 | cd "${pkgbuild_dir}" |
107 | 107 | pkgbuild_dirs=($(ls "${pkgbuild_dir}" 2> /dev/null)) |
108 | 108 | if (( "${#pkgbuild_dirs[@]}" != 0 )); then |
109 | - for _dir in ${pkgbuild_dirs[@]}; do | |
109 | + for _dir in "${pkgbuild_dirs[@]}"; do | |
110 | 110 | cd "${_dir}" |
111 | 111 | depends=($(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; echo "${depends[@]}")) |
112 | 112 | makedepends=($(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; echo "${makedepends[@]}")) |
113 | 113 | if (( ${#depends[@]} + ${#makedepends[@]} != 0 )); then |
114 | - for _pkg in ${depends[@]} ${makedepends[@]}; do | |
114 | + for _pkg in "${depends[@]}" "${makedepends[@]}"; do | |
115 | 115 | if pacman -Ssq "${_pkg}" | grep -x "${_pkg}" 1> /dev/null; then |
116 | 116 | pacman -S --asdeps --needed "${pacman_args[@]}" "${_pkg}" |
117 | 117 | fi |
@@ -7,6 +7,9 @@ Alter Linuxのビルドに使用する処理をコマンド化したものです | ||
7 | 7 | 全てのチャンネルのパッケージの一覧を表示します。 |
8 | 8 | `channel.sh`でチャンネルの一覧を取得後、`pkglist.sh`でパッケージ一覧を取得します。 |
9 | 9 | |
10 | +## alteriso-info.sh | |
11 | +ビルド情報を書いたテキストファイルを出力します。詳細は`alteiso-info.sh`を実行してください。 | |
12 | + | |
10 | 13 | ## build_helper.py |
11 | 14 | GUIのビルドヘルパーです。PyGobjectが必要です。 |
12 | 15 |
@@ -43,6 +46,10 @@ menuconfigで使用されるスクリプトです。 | ||
43 | 46 | ## menuconf-to-alterconf.sh |
44 | 47 | menuconfigで使用されるスクリプトです。 |
45 | 48 | |
49 | +## module.sh | |
50 | +使用可能なモジュールの一覧や確認を行います。 | |
51 | +詳細は`module.sh -h`を実行してください。 | |
52 | + | |
46 | 53 | ## msg.sh |
47 | 54 | ラベルと色がついたメッセージを出力します。このスクリプトは様々な場所から呼び出されます。 |
48 | 55 | 詳細は`msg.sh -h`を実行してください。 |
@@ -52,7 +59,7 @@ menuconfigで使用されるスクリプトです。 | ||
52 | 59 | `build.sh`の依存関係チェックに使用されています。 |
53 | 60 | 詳細は`package.py -h`を実行してください。 |
54 | 61 | |
55 | -## pkglist.py | |
62 | +## pkglist.sh | |
56 | 63 | 指定されたチャンネルのパッケージ一覧を取得します。 |
57 | 64 | 詳細は`pkglist.sh`を実行してください。 |
58 | 65 |
@@ -60,6 +67,11 @@ menuconfigで使用されるスクリプトです。 | ||
60 | 67 | `allpkglist.sh`で全てのパッケージ一覧を取得後、そのパッケージが公式リポジトリから利用可能かどうかを調べます。 |
61 | 68 | 詳細は`testpkg.sh`を実行してください。 |
62 | 69 | |
70 | +## umount.sh | |
71 | +指定されたディレクトリ以下のマウントポイントを検索してアンマウントします。 | |
72 | +`build.sh`や`clean.sh`から呼び出されます。 | |
73 | +詳細は`umount.sh`を実行してください。 | |
74 | + | |
63 | 75 | ## wizard.sh |
64 | 76 | CLIの対話型のビルド設定ツールです。英語と日本語に対応しています。 |
65 | 77 | 依存パッケージの自動インストールやキーリングの自動インストールを行います。 |
@@ -4,7 +4,7 @@ set -e | ||
4 | 4 | |
5 | 5 | load_config() { |
6 | 6 | local _file |
7 | - for _file in ${@}; do | |
7 | + for _file in "${@}"; do | |
8 | 8 | if [[ -f "${_file}" ]]; then |
9 | 9 | source "${_file}" |
10 | 10 | fi |
@@ -79,7 +79,7 @@ fi | ||
79 | 79 | |
80 | 80 | load_config() { |
81 | 81 | local _file |
82 | - for _file in ${@}; do | |
82 | + for _file in "${@}"; do | |
83 | 83 | if [[ -f "${_file}" ]]; then |
84 | 84 | source "${_file}" |
85 | 85 | fi |
@@ -88,12 +88,12 @@ load_config() { | ||
88 | 88 | |
89 | 89 | for_module(){ |
90 | 90 | local module |
91 | - for module in ${modules[@]}; do | |
92 | - eval $(echo ${@} | sed "s|{}|${module}|g") | |
91 | + for module in "${modules[@]}"; do | |
92 | + eval $(echo "${@}" | sed "s|{}|${module}|g") | |
93 | 93 | done |
94 | 94 | } |
95 | 95 | |
96 | -for arch in ${archs[@]}; do | |
96 | +for arch in "${archs[@]}"; do | |
97 | 97 | for channel in $("${tools_dir}/channel.sh" show -a "${arch}" -b -d -k zen -f); do |
98 | 98 | modules=($( |
99 | 99 | load_config "${script_path}/default.conf" "${script_path}/custom.conf" |
@@ -105,7 +105,7 @@ for arch in ${archs[@]}; do | ||
105 | 105 | modules=("share") |
106 | 106 | fi |
107 | 107 | fi |
108 | - for module in ${modules[@]}; do | |
108 | + for module in "${modules[@]}"; do | |
109 | 109 | dependent="${module_dir}/${module}/dependent" |
110 | 110 | if [[ -f "${dependent}" ]]; then |
111 | 111 | modules+=($(grep -h -v ^'#' "${dependent}" | tr -d "\n" )) |
@@ -97,7 +97,7 @@ variable_list=( | ||
97 | 97 | "iso_version" |
98 | 98 | ) |
99 | 99 | |
100 | -for var in ${variable_list[@]}; do | |
100 | +for var in "${variable_list[@]}"; do | |
101 | 101 | if [[ -z "$(eval echo '$'${var})" ]]; then |
102 | 102 | echo "${var} is empty" >&2 |
103 | 103 | exit 1 |
@@ -237,10 +237,10 @@ else | ||
237 | 237 | fi |
238 | 238 | |
239 | 239 | case "${mode}" in |
240 | - "check" ) check ${@} ;; | |
240 | + "check" ) check "${@}" ;; | |
241 | 241 | "show" ) show ;; |
242 | - "desc" ) desc ${@} ;; | |
243 | - "ver" ) get_alteriso_version ${@} ;; | |
242 | + "desc" ) desc "${@}" ;; | |
243 | + "ver" ) get_alteriso_version "${@}" ;; | |
244 | 244 | "help" ) _help; exit 0 ;; |
245 | 245 | * ) _help; exit 1 ;; |
246 | 246 | esac |
@@ -4,6 +4,7 @@ set -eu | ||
4 | 4 | |
5 | 5 | script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && cd .. && pwd )" |
6 | 6 | work_dir="${script_path}/work" |
7 | +tools_dir="${script_path}/tools" | |
7 | 8 | debug=false |
8 | 9 | only_work=false |
9 | 10 | noconfirm=false |
@@ -13,7 +14,7 @@ noconfirm=false | ||
13 | 14 | # load_config [file1] [file2] ... |
14 | 15 | load_config() { |
15 | 16 | local _file |
16 | - for _file in ${@}; do | |
17 | + for _file in "${@}"; do | |
17 | 18 | if [[ -f "${_file}" ]]; then |
18 | 19 | source "${_file}" |
19 | 20 | fi |
@@ -90,22 +91,7 @@ _umount() { if mountpoint -q "${1}"; then umount -lf "${1}"; fi; } | ||
90 | 91 | |
91 | 92 | # Unmount chroot dir |
92 | 93 | umount_chroot () { |
93 | - local _mount | |
94 | - if [[ ! -v "work_dir" ]] || [[ "${work_dir}" = "" ]]; then | |
95 | - msg_error "Exception error about working directory" 1 | |
96 | - fi | |
97 | - if [[ ! -d "${work_dir}" ]]; then | |
98 | - return 0 | |
99 | - fi | |
100 | - for _mount in $(find "${work_dir}" -mindepth 1 -type d -printf "%p\0" | xargs -0 -I{} bash -c "mountpoint -q {} && echo {}" | tac); do | |
101 | - if echo "${_mount}" | grep "${work_dir}" > /dev/null 2>&1 || echo "${_mount}" | grep "${script_path}" > /dev/null 2>&1 || echo "${_mount}" | grep "${out_dir}" > /dev/null 2>&1; then | |
102 | - msg_info "Unmounting ${_mount}" | |
103 | - _umount "${_mount}" 2> /dev/null | |
104 | - else | |
105 | - msg_error "It is dangerous to unmount a directory that is not managed by the script." | |
106 | - msg_error "Path: ${_mount}" | |
107 | - fi | |
108 | - done | |
94 | + "${tools_dir}/umount.sh" "${work_dir}" | |
109 | 95 | } |
110 | 96 | |
111 | 97 | # Usage: getclm <number> |
@@ -168,9 +154,7 @@ fi | ||
168 | 154 | umount_chroot |
169 | 155 | if [[ "${only_work}" = false ]]; then |
170 | 156 | remove "${script_path}/menuconfig/build/"** |
171 | - remove "${script_path}/system/cpp-src/mkalteriso/build"/** | |
172 | 157 | remove "${script_path}/menuconfig-script/kernel_choice" |
173 | - remove "${script_path}/system/mkalteriso" | |
174 | 158 | fi |
175 | 159 | |
176 | 160 | remove "${work_dir%/}"/** |
@@ -15,6 +15,8 @@ architectures=("x86_64" "i686") | ||
15 | 15 | locale_list=("ja" "en") |
16 | 16 | share_options=() |
17 | 17 | default_options=("--boot-splash" "--cleanup" "--user" "alter" "--password" "alter") |
18 | +failed=() | |
19 | +abort=false | |
18 | 20 | |
19 | 21 | work_dir="${script_path}/work" |
20 | 22 | simulation=false |
@@ -25,62 +27,39 @@ all_channel=false | ||
25 | 27 | customized_work=false |
26 | 28 | noconfirm=false |
27 | 29 | |
28 | -# Show an INFO message | |
29 | -# $1: message string | |
30 | -msg_info() { | |
31 | - local _msg_opts="-a fullbuilid -s 5" | |
32 | - if [[ "${1}" = "-n" ]]; then | |
33 | - _msg_opts="${_msg_opts} -o -n" | |
34 | - shift 1 | |
35 | - fi | |
36 | - "${script_path}/tools/msg.sh" ${_msg_opts} info "${1}" | |
30 | +# Message common function | |
31 | +# msg_common [type] [-n] [string] | |
32 | +msg_common(){ | |
33 | + local _msg_opts=("-a" "fullbuild" "-s" "5") _type="${1}" | |
34 | + shift 1 | |
35 | + [[ "${1}" = "-n" ]] && _msg_opts+=("-o" "-n") && shift 1 | |
36 | + [[ "${nocolor}" = true ]] && _msg_opts+=("-n") | |
37 | + _msg_opts+=("${_type}" "${@}") | |
38 | + "${script_path}/tools/msg.sh" "${_msg_opts[@]}" | |
37 | 39 | } |
38 | 40 | |
39 | -# Show an Warning message | |
40 | -# $1: message string | |
41 | -msg_warn() { | |
42 | - local _msg_opts="-a fullbuilid -s 5" | |
43 | - if [[ "${1}" = "-n" ]]; then | |
44 | - _msg_opts="${_msg_opts} -o -n" | |
45 | - shift 1 | |
46 | - fi | |
47 | - "${script_path}/tools/msg.sh" ${_msg_opts} warn "${1}" | |
48 | -} | |
41 | +# Show an INFO message | |
42 | +# ${1}: message string | |
43 | +msg_info() { msg_common info "${@}"; } | |
49 | 44 | |
50 | -# Show an debug message | |
51 | -# $1: message string | |
52 | -msg_debug() { | |
53 | - if [[ "${debug}" = true ]]; then | |
54 | - local _msg_opts="-a fullbuilid -s 5" | |
55 | - if [[ "${1}" = "-n" ]]; then | |
56 | - _msg_opts="${_msg_opts} -o -n" | |
57 | - shift 1 | |
58 | - fi | |
59 | - "${script_path}/tools/msg.sh" ${_msg_opts} debug "${1}" | |
60 | - fi | |
61 | -} | |
45 | +# Show an Warning message | |
46 | +# ${1}: message string | |
47 | +msg_warn() { msg_common warn "${@}"; } | |
62 | 48 | |
63 | 49 | # Show an ERROR message then exit with status |
64 | -# $1: message string | |
65 | -# $2: exit code number (with 0 does not exit) | |
50 | +# ${1}: message string | |
51 | +# ${2}: exit code number (with 0 does not exit) | |
66 | 52 | msg_error() { |
67 | - local _msg_opts="-a fullbuilid -s 5" | |
68 | - if [[ "${1}" = "-n" ]]; then | |
69 | - _msg_opts="${_msg_opts} -o -n" | |
70 | - shift 1 | |
71 | - fi | |
72 | - "${script_path}/tools/msg.sh" ${_msg_opts} error "${1}" | |
73 | - if [[ -n "${2:-}" ]]; then | |
74 | - exit ${2} | |
75 | - fi | |
53 | + msg_common error "${1}" | |
54 | + [[ -n "${2:-}" ]] && exit "${2}" | |
76 | 55 | } |
77 | 56 | |
78 | 57 | |
79 | 58 | trap_exit() { |
80 | - local status=${?} | |
59 | + local status="${?}" | |
81 | 60 | echo |
82 | 61 | msg_error "fullbuild.sh has been killed by the user." |
83 | - exit ${status} | |
62 | + exit "${status}" | |
84 | 63 | } |
85 | 64 | |
86 | 65 |
@@ -90,7 +69,8 @@ build() { | ||
90 | 69 | _options+=("--arch" "${arch}" "--lang" "${lang}" "${cha}") |
91 | 70 | |
92 | 71 | if [[ "${simulation}" = false ]] && [[ "${remove_cache}" = true ]]; then |
93 | - sudo pacman -Sccc --noconfirm | |
72 | + msg_info "Removing package cache for ${arch}" | |
73 | + sudo rm -rf "${work_dir}/cache/${arch}" | |
94 | 74 | fi |
95 | 75 | |
96 | 76 | if [[ ! -e "${fullbuild_dir}/fullbuild.${cha}_${arch}_${lang}" ]]; then |
@@ -105,7 +85,11 @@ build() { | ||
105 | 85 | touch "${fullbuild_dir}/fullbuild.${cha}_${arch}_${lang}" |
106 | 86 | elif (( "${retry_count}" == "${retry}" )); then |
107 | 87 | msg_error "Failed to build (Exit code: ${_exit_code})" |
108 | - exit "${_exit_code}" | |
88 | + if [[ "${abort}" = true ]]; then | |
89 | + exit "${_exit_code}" | |
90 | + else | |
91 | + failed+=("${cha}-${arch}-${lang}") | |
92 | + fi | |
109 | 93 | else |
110 | 94 | msg_error "build.sh finished with exit code ${_exit_code}. Will try again." |
111 | 95 | fi |
@@ -121,6 +105,7 @@ _help() { | ||
121 | 105 | echo " -a <options> Set other options in build.sh" |
122 | 106 | echo " -c Build all channel (DO NOT specify the channel !!)" |
123 | 107 | echo " -d Use the default build.sh arguments. (${default_options[*]})" |
108 | + echo " -e Exit the script when the build fails" | |
124 | 109 | echo " -g Use gitversion" |
125 | 110 | echo " -h | --help This help message" |
126 | 111 | echo " -l <locale> Set the locale to build" |
@@ -148,7 +133,7 @@ share_options+=("--noconfirm") | ||
148 | 133 | |
149 | 134 | # Parse options |
150 | 135 | ARGUMENT=("${@}") |
151 | -OPTS="a:dghr:sctm:l:w:" | |
136 | +OPTS="a:deghr:sctm:l:w:" | |
152 | 137 | OPTL="help,remove-cache,noconfirm" |
153 | 138 | if ! OPT=$(getopt -o ${OPTS} -l ${OPTL} -- "${ARGUMENT[@]}"); then |
154 | 139 | exit 1 |
@@ -157,7 +142,7 @@ eval set -- "${OPT}" | ||
157 | 142 | unset OPT OPTS OPTL ARGUMENT |
158 | 143 | |
159 | 144 | while true; do |
160 | - case ${1} in | |
145 | + case "${1}" in | |
161 | 146 | -a) |
162 | 147 | share_options+=(${2}) |
163 | 148 | shift 2 |
@@ -170,6 +155,10 @@ while true; do | ||
170 | 155 | share_options+=("${default_options[@]}") |
171 | 156 | shift 1 |
172 | 157 | ;; |
158 | + -e) | |
159 | + abort=true | |
160 | + shift 1 | |
161 | + ;; | |
173 | 162 | -m) |
174 | 163 | architectures=(${2}) |
175 | 164 | shift 2 |
@@ -236,7 +225,7 @@ if [[ "${all_channel}" = true ]]; then | ||
236 | 225 | channnels=($("${script_path}/tools/channel.sh" -b show)) |
237 | 226 | fi |
238 | 227 | elif [[ -n "${*}" ]]; then |
239 | - channnels=(${@}) | |
228 | + channnels=("${@}") | |
240 | 229 | fi |
241 | 230 | |
242 | 231 | if [[ "${simulation}" = true ]]; then |
@@ -271,16 +260,11 @@ fi | ||
271 | 260 | |
272 | 261 | trap 'trap_exit' 1 2 3 15 |
273 | 262 | |
274 | -if [[ "${simulation}" = false ]]; then | |
275 | - msg_info "Update the package database." | |
276 | - sudo pacman -Syy | |
277 | -fi | |
278 | - | |
279 | -for arch in ${architectures[@]}; do | |
280 | - for cha in ${channnels[@]}; do | |
281 | - for lang in ${locale_list[@]}; do | |
282 | - for retry_count in $(seq 1 ${retry}); do | |
283 | - if [[ -n $(cat "${script_path}/channels/${cha}/architecture" | grep -h -v ^'#' | grep -x "${arch}") ]]; then | |
263 | +for arch in "${architectures[@]}"; do | |
264 | + for cha in "${channnels[@]}"; do | |
265 | + for lang in "${locale_list[@]}"; do | |
266 | + for retry_count in $(seq 1 "${retry}"); do | |
267 | + if [[ -n "$(cat "${script_path}/channels/${cha}/architecture" | grep -h -v ^'#' | grep -x "${arch}")" ]]; then | |
284 | 268 | build |
285 | 269 | fi |
286 | 270 | done |
@@ -290,5 +274,10 @@ done | ||
290 | 274 | |
291 | 275 | |
292 | 276 | if [[ "${simulation}" = false ]]; then |
293 | - msg_info "All editions have been built" | |
277 | + if (( "${#failed[@]}" == 0 )); then | |
278 | + msg_info "All editions have been built" | |
279 | + else | |
280 | + msg_error "Build of the following settings failed" | |
281 | + printf " - %s\n" "${failed[@]}" | |
282 | + fi | |
294 | 283 | fi |
@@ -6,25 +6,9 @@ arch_list=( | ||
6 | 6 | "i686" |
7 | 7 | ) |
8 | 8 | |
9 | -# rm helper | |
10 | -# Delete the file if it exists. | |
11 | -# For directories, rm -rf is used. | |
12 | -# If the file does not exist, skip it. | |
13 | -# remove <file> <file> ... | |
14 | -remove() { | |
15 | - local _list=($(echo "$@")) _file | |
16 | - for _file in "${_list[@]}"; do | |
17 | - if [[ -f "${_file}" ]]; then | |
18 | - rm -f "${_file}" | |
19 | - elif [[ -d "${_file}" ]]; then | |
20 | - rm -rf "${_file}" | |
21 | - fi | |
22 | - done | |
23 | -} | |
24 | - | |
25 | 9 | #cd "${script_path}" |
26 | -for arch in ${arch_list[@]}; do | |
27 | - remove "${script_path}/menuconfig-script/kernel_choice_${arch}" | |
10 | +for arch in "${arch_list[@]}"; do | |
11 | + rm -rf "${script_path}/menuconfig-script/kernel_choice_${arch}" | |
28 | 12 | for kernel in $(bash "${script_path}/tools/kernel.sh" -a "${arch}" show ); do |
29 | 13 | echo "config KERNEL_N_A_M_E_${kernel}" >> "${script_path}/menuconfig-script/kernel_choice_${arch}" |
30 | 14 | echo -e "\tbool ${kernel}" >> "${script_path}/menuconfig-script/kernel_choice_${arch}" |
@@ -101,7 +101,7 @@ get() { | ||
101 | 101 | _kernel_name_list=($(cat "${_kernel_config_file}" | grep -h -v ^'#' | getclm 1)) |
102 | 102 | _get_kernel_line() { |
103 | 103 | local _kernel _count=0 |
104 | - for _kernel in ${_kernel_name_list[@]}; do | |
104 | + for _kernel in "${_kernel_name_list[@]}"; do | |
105 | 105 | _count=$(( _count + 1 )) |
106 | 106 | if [[ "${_kernel}" = "${1}" ]]; then echo "${_count}"; return 0; fi |
107 | 107 | done |
@@ -175,9 +175,9 @@ else | ||
175 | 175 | fi |
176 | 176 | |
177 | 177 | case "${mode}" in |
178 | - "check" ) check ${@} ;; | |
178 | + "check" ) check "${@}" ;; | |
179 | 179 | "show" ) show ;; |
180 | - "get" ) get ${@} ;; | |
180 | + "get" ) get "${@}" ;; | |
181 | 181 | "help" ) _help; exit 0 ;; |
182 | 182 | * ) _help; exit 1 ;; |
183 | 183 | esac |
@@ -171,7 +171,7 @@ checkpkg() { | ||
171 | 171 | |
172 | 172 | run() { |
173 | 173 | msg_info "Running ${*}" |
174 | - ${@} | |
174 | + eval "${@}" | |
175 | 175 | } |
176 | 176 | |
177 | 177 |
@@ -90,13 +90,13 @@ get() { | ||
90 | 90 | _locale_name_list=($(cat "${_locale_config_file}" | grep -h -v ^'#' | awk '{print $1}')) |
91 | 91 | _get_locale_line_number() { |
92 | 92 | local _lang _count=0 |
93 | - for _lang in ${_locale_name_list[@]}; do | |
93 | + for _lang in "${_locale_name_list[@]}"; do | |
94 | 94 | _count=$(( _count + 1 )) |
95 | 95 | if [[ "${_lang}" = "${1}" ]]; then echo "${_count}"; return 0; fi |
96 | 96 | done |
97 | 97 | echo -n "failed" |
98 | 98 | } |
99 | - _locale_line_number="$(_get_locale_line_number ${@})" | |
99 | + _locale_line_number="$(_get_locale_line_number "${@}")" | |
100 | 100 | |
101 | 101 | # 不正なロケール名なら終了する |
102 | 102 | if [[ "${_locale_line_number}" = "failed" ]]; then |
@@ -131,7 +131,7 @@ eval set -- "${OPT}" | ||
131 | 131 | unset OPTS OPTL |
132 | 132 | |
133 | 133 | while true; do |
134 | - case ${1} in | |
134 | + case "${1}" in | |
135 | 135 | -a | --arch) |
136 | 136 | arch="${2}" |
137 | 137 | shift 2 |
@@ -165,9 +165,9 @@ else | ||
165 | 165 | fi |
166 | 166 | |
167 | 167 | case "${mode}" in |
168 | - "check" ) check ${@} ;; | |
168 | + "check" ) check "${@}" ;; | |
169 | 169 | "show" ) show ;; |
170 | - "get" ) get ${@} ;; | |
170 | + "get" ) get "${@}" ;; | |
171 | 171 | "help" ) _help; exit 0 ;; |
172 | 172 | * ) _help; exit 1 ;; |
173 | 173 | esac |
@@ -44,8 +44,8 @@ _help() { | ||
44 | 44 | # for_module <command> |
45 | 45 | for_module(){ |
46 | 46 | local module |
47 | - for module in ${modules[@]}; do | |
48 | - eval $(echo ${@} | sed "s|{}|${module}|g") | |
47 | + for module in "${modules[@]}"; do | |
48 | + eval $(echo "${@}" | sed "s|{}|${module}|g") | |
49 | 49 | done |
50 | 50 | } |
51 | 51 |
@@ -183,7 +183,7 @@ fi | ||
183 | 183 | |
184 | 184 | #-- Read package list --# |
185 | 185 | # Read the file and remove comments starting with # and add it to the list of packages to install. |
186 | -for _file in ${_loadfilelist[@]}; do | |
186 | +for _file in "${_loadfilelist[@]}"; do | |
187 | 187 | if [[ -f "${_file}" ]]; then |
188 | 188 | msg_debug "Loaded package file ${_file}" |
189 | 189 | _pkglist=( ${_pkglist[@]} "$(grep -h -v ^'#' ${_file})" ) |
@@ -197,7 +197,7 @@ done | ||
197 | 197 | _excludefile=("${channel_dir}/packages.${arch}/exclude" "${channel_dir}/packages_aur.${arch}/exclude") |
198 | 198 | for_module '_excludefile+=("${module_dir}/{}/packages.${arch}/exclude" "${module_dir}/{}/packages_aur.${arch}/exclude")' |
199 | 199 | |
200 | -for _file in ${_excludefile[@]}; do | |
200 | +for _file in "${_excludefile[@]}"; do | |
201 | 201 | if [[ -f "${_file}" ]]; then |
202 | 202 | _excludelist+=($(grep -h -v ^'#' "${_file}") ) |
203 | 203 | fi |
@@ -89,7 +89,7 @@ done | ||
89 | 89 | |
90 | 90 | # パッケージ一覧 |
91 | 91 | msg_debug "Getting package list ..." |
92 | -for arch in ${archs[@]}; do | |
92 | +for arch in "${archs[@]}"; do | |
93 | 93 | packages+=($("${script_path}/tools/allpkglist.sh" -s -a "${arch}")) |
94 | 94 | done |
95 | 95 |
@@ -98,7 +98,7 @@ msg_debug "Getting group list ..." | ||
98 | 98 | group_list=($(curl -s https://archlinux.org/groups/ | grep "/groups/x86_64" | cut -d "/" -f 4)) |
99 | 99 | |
100 | 100 | # 実行開始 |
101 | -for pkg in ${packages[@]}; do | |
101 | +for pkg in "${packages[@]}"; do | |
102 | 102 | msg_debug "Searching ${pkg} ..." |
103 | 103 | if ! searchpkg "${pkg}"; then |
104 | 104 | echo "${pkg} is not in the official repository." >&2 |
@@ -19,6 +19,7 @@ tools_dir="${script_path}/tools/" | ||
19 | 19 | debug=false |
20 | 20 | nocolor=false |
21 | 21 | force=false |
22 | +maxdepth="2" | |
22 | 23 | |
23 | 24 | _help() { |
24 | 25 | echo "usage ${0} [options] [dir]" |
@@ -28,6 +29,7 @@ _help() { | ||
28 | 29 | echo " General options:" |
29 | 30 | echo " -f | --force Force umount (No warning)" |
30 | 31 | echo " -d | --debug Enable debug message" |
32 | + echo " -m | --maxdepth Specify the maximum hierarchy (set 0 to no limit)" | |
31 | 33 | echo " -h | --help This help message" |
32 | 34 | } |
33 | 35 |
@@ -76,7 +78,8 @@ umount_work () { | ||
76 | 78 | fi |
77 | 79 | [[ ! -d "${target_dir}" ]] && return 0 |
78 | 80 | while read -r _mount; do |
79 | - if echo "${_mount}" | grep "${target_dir}" > /dev/null 2>&1 || [[ "${force}" = true ]]; then | |
81 | + if [[ "${force}" = true ]] || [[ "${_mount}" = "${target_dir}"* ]] > /dev/null 2>&1; then | |
82 | + msg_debug "Checking ${_mount}" | |
80 | 83 | if mountpoint -q "${_mount}"; then |
81 | 84 | msg_info "Unmounting ${_mount}" |
82 | 85 | _umount "${_mount}" 2> /dev/null |
@@ -84,7 +87,13 @@ umount_work () { | ||
84 | 87 | else |
85 | 88 | msg_error "It is dangerous to unmount a directory that is not managed by the script." |
86 | 89 | fi |
87 | - done < <(find "${target_dir}" -mindepth 1 -type d -printf "%p\n" | tac) | |
90 | + done < <( | |
91 | + if (( maxdepth == 0 )); then | |
92 | + find "${target_dir}" -mindepth 1 -type d -printf "%p\n" | tac | |
93 | + else | |
94 | + find "${target_dir}" -mindepth 1 -maxdepth "${maxdepth}" -type d -printf "%p\n" | tac | |
95 | + fi | |
96 | + ) | |
88 | 97 | } |
89 | 98 | |
90 | 99 |
@@ -94,8 +103,8 @@ if (( ! "${EUID}" == 0 )); then | ||
94 | 103 | fi |
95 | 104 | |
96 | 105 | # Parse options |
97 | -OPTS=("dfh") | |
98 | -OPTL=("debug" "force" "help:") | |
106 | +OPTS=("d" "f" "h" "m:") | |
107 | +OPTL=("debug" "force" "help" "maxdepth:") | |
99 | 108 | if ! OPT=$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${@}"); then |
100 | 109 | exit 1 |
101 | 110 | fi |
@@ -114,6 +123,10 @@ while true; do | ||
114 | 123 | force=true |
115 | 124 | shift 1 |
116 | 125 | ;; |
126 | + -m | --maxdepth) | |
127 | + maxdepth="${2}" | |
128 | + shift 2 | |
129 | + ;; | |
117 | 130 | -h | --help) |
118 | 131 | _usage |
119 | 132 | exit 0 |
@@ -133,7 +146,7 @@ done | ||
133 | 146 | if [[ -z "${1+SET}" ]]; then |
134 | 147 | msg_error "Please specify the target directory." "1" |
135 | 148 | else |
136 | - target_dir="${1}" | |
149 | + target_dir="$(realpath "${1}")" | |
137 | 150 | fi |
138 | 151 | |
139 | 152 | umount_work |
@@ -166,7 +166,7 @@ Function_Global_Main_check_required_files () { | ||
166 | 166 | "default.conf" |
167 | 167 | ) |
168 | 168 | |
169 | - for Var_Local_file in ${Var_Local_file_list[@]}; do | |
169 | + for Var_Local_file in "${Var_Local_file_list[@]}"; do | |
170 | 170 | if [[ ! -f "${Var_Global_Wizard_Env_script_path}/${Var_Local_file}" ]]; then |
171 | 171 | msg_error "${Var_Local_file}が見つかりませんでした。" "${Var_Local_file} was not found." |
172 | 172 | Var_Local_error=true |
@@ -199,9 +199,9 @@ Function_Global_Main_install_dependent_packages () { | ||
199 | 199 | local Var_Local_package Var_Local_installed_package Var_Local_installed_version |
200 | 200 | Var_Local_installed_package=($(pacman -Q | getclm 1)) |
201 | 201 | Var_Local_installed_version=($(pacman -Q | getclm 2)) |
202 | - for Var_Local_package in $(seq 0 $(( ${#Var_Local_installed_package[@]} - 1 ))); do | |
203 | - if [[ ${Var_Local_installed_package[${Var_Local_package}]} = ${1} ]]; then | |
204 | - if [[ ${Var_Local_installed_version[${Var_Local_package}]} = $(pacman -Sp --print-format '%v' --config "${Var_Global_Wizard_Env_pacman_conf}" ${1}) ]]; then | |
202 | + for Var_Local_package in $(seq 0 $(( "${#Var_Local_installed_package[@]}" - 1 ))); do | |
203 | + if [[ "${Var_Local_installed_package[${Var_Local_package}]}" = "${1}" ]]; then | |
204 | + if [[ "${Var_Local_installed_version[${Var_Local_package}]}" = $(pacman -Sp --print-format '%v' --config "${Var_Global_Wizard_Env_pacman_conf}" ${1}) ]]; then | |
205 | 205 | echo -n "true" |
206 | 206 | return 0 |
207 | 207 | else |
@@ -214,14 +214,14 @@ Function_Global_Main_install_dependent_packages () { | ||
214 | 214 | return 0 |
215 | 215 | } |
216 | 216 | echo |
217 | - for Var_Local_package in ${dependence[@]}; do | |
217 | + for Var_Local_package in "${dependence[@]}"; do | |
218 | 218 | msg "依存パッケージ ${Var_Local_package} を確認しています..." "Checking dependency package ${Var_Local_package} ..." |
219 | 219 | if [[ $(Function_Local_checkpkg ${Var_Local_package}) = false ]]; then |
220 | 220 | Var_Global_missing_packages+=(${Var_Local_package}) |
221 | 221 | fi |
222 | 222 | done |
223 | 223 | if [[ -n "${Var_Global_missing_packages[*]}" ]]; then |
224 | - yay -S --needed --config "${Var_Global_Wizard_Env_pacman_conf}" ${Var_Global_missing_packages[@]} | |
224 | + yay -S --needed --config "${Var_Global_Wizard_Env_pacman_conf}" "${Var_Global_missing_packages[@]}" | |
225 | 225 | fi |
226 | 226 | echo |
227 | 227 | } |
@@ -255,7 +255,7 @@ Function_Global_Main_run_keyring.sh () { | ||
255 | 255 | |
256 | 256 | Function_Global_Main_remove_dependent_packages () { |
257 | 257 | if [[ -n "${Var_Global_missing_packages[*]}" ]]; then |
258 | - sudo pacman -Rsn --config "${Var_Global_Wizard_Env_pacman_conf}" ${Var_Global_missing_packages[@]} | |
258 | + sudo pacman -Rsn --config "${Var_Global_Wizard_Env_pacman_conf}" "${Var_Global_missing_packages[@]}" | |
259 | 259 | fi |
260 | 260 | } |
261 | 261 |
@@ -313,7 +313,7 @@ Function_Global_Ask_locale() { | ||
313 | 313 | |
314 | 314 | local Var_Local_locale_list Var_Local_locale Var_Local_count=1 Var_Local_input_locale |
315 | 315 | Var_Local_locale_list=($("${Var_Global_Wizard_Env_script_path}/tools/locale.sh" -a "${Var_Global_Wizard_Option_build_arch}" show)) |
316 | - for Var_Local_locale in ${Var_Local_locale_list[@]}; do | |
316 | + for Var_Local_locale in "${Var_Local_locale_list[@]}"; do | |
317 | 317 | ( |
318 | 318 | local locale_name locale_gen_name locale_version locale_time locale_fullname |
319 | 319 | eval $("${Var_Global_Wizard_Env_script_path}/tools/locale.sh" -a "${Var_Global_Wizard_Option_build_arch}" get "${Var_Local_locale}" ) |
@@ -328,7 +328,7 @@ Function_Global_Ask_locale() { | ||
328 | 328 | |
329 | 329 | set +e |
330 | 330 | expr "${Var_Local_input_locale}" + 1 >/dev/null 2>&1 |
331 | - if [[ ${?} -lt 2 ]]; then | |
331 | + if [[ "${?}" -lt 2 ]]; then | |
332 | 332 | set -e |
333 | 333 | # 数字である |
334 | 334 | Var_Local_input_locale=$(( Var_Local_input_locale - 1 )) |
@@ -562,7 +562,7 @@ Function_Global_Ask_kernel () { | ||
562 | 562 | |
563 | 563 | #選択肢の生成 |
564 | 564 | local Var_Local_kernel Var_Local_count=1 Var_Local_int |
565 | - for Var_Local_kernel in ${Var_Local_kernel_list[@]}; do | |
565 | + for Var_Local_kernel in "${Var_Local_kernel_list[@]}"; do | |
566 | 566 | ( |
567 | 567 | local kernel kernel_filename kernel_mkinitcpio_profile |
568 | 568 | eval $("${Var_Global_Wizard_Env_script_path}/tools/kernel.sh" -a "${Var_Global_Wizard_Option_build_arch}" get "${Var_Local_kernel}" ) |
@@ -616,7 +616,7 @@ Function_Global_Ask_channel () { | ||
616 | 616 | |
617 | 617 | msg "チャンネルを以下の番号から選択してください。" "Select a channel from the numbers below." |
618 | 618 | # 選択肢を生成 |
619 | - for Var_Local_channel in ${Var_Local_channel_list[@]}; do | |
619 | + for Var_Local_channel in "${Var_Local_channel_list[@]}"; do | |
620 | 620 | if [[ -f "${Var_Global_Wizard_Env_script_path}/channels/${Var_Local_channel_dir[$(( Var_Local_count - 1 ))]}/description.txt" ]]; then |
621 | 621 | Var_Local_description=$(cat "${Var_Global_Wizard_Env_script_path}/channels/${Var_Local_channel_dir[$(( Var_Local_count - 1 ))]}/description.txt") |
622 | 622 | else |