Skip to content

Commit b9fe019

Browse files
committed
[clean] : Do not use aur variables
1 parent a34a919 commit b9fe019

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

tools/pkglist.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module_dir="${script_path}/modules"
77
modules=()
88

99
boot_splash=false
10-
aur=false
1110
pkgdir_name="packages"
1211
line=false
1312
debug=false
@@ -58,16 +57,16 @@ for_module(){
5857

5958
# Message functions
6059
msg_error() {
61-
"${script_path}/tools/msg.sh" -s "5" -a "pkglist.sh" -l "Error" -r "red" error "${1}"
60+
"${script_path}/tools/msg.sh" -s "5" -a "pkglist.sh" -l "Error" -r "red" -p "stderr" error "${1}"
6261
}
6362

6463
msg_info() {
65-
"${script_path}/tools/msg.sh" -s "5" -a "pkglist.sh" -l "Info" -r "green" error "${1}"
64+
"${script_path}/tools/msg.sh" -s "5" -a "pkglist.sh" -l "Info" -r "green" -p "stderr" info "${1}"
6665
}
6766

6867
msg_debug() {
6968
if [[ "${debug}" = true ]]; then
70-
"${script_path}/tools/msg.sh" -s "5" -a "pkglist.sh" -l "Debug" -r "magenta" error "${1}"
69+
"${script_path}/tools/msg.sh" -s "5" -a "pkglist.sh" -l "Debug" -r "magenta" -p "stderr" debug "${1}"
7170
fi
7271
}
7372

@@ -118,7 +117,7 @@ while true; do
118117
shift 1
119118
;;
120119
--aur)
121-
aur=true
120+
pkgdir_name="packages_aur"
122121
shift 1
123122
;;
124123
--line)
@@ -139,7 +138,6 @@ done
139138

140139
modules=("${@}")
141140

142-
143141
if [[ -z "${arch}" ]] || [[ "${arch}" = "" ]]; then
144142
msg_error "Architecture not specified"
145143
exit 1
@@ -154,16 +152,8 @@ elif [[ -z "${locale_name}" ]] || [[ "${locale_name}" = "" ]]; then
154152
exit 1
155153
fi
156154

157-
158-
if [[ "${aur}" = true ]]; then
159-
pkgdir_name="packages_aur"
160-
else
161-
pkgdir_name="packages"
162-
fi
163-
164155
set +e
165156

166-
167157
#-- Detect package list to load --#
168158
# Add the files for each channel to the list of files to read.
169159
_loadfilelist=(
@@ -219,7 +209,6 @@ if (( "${#additional_exclude_pkg[@]}" >= 1 )); then
219209
msg_debug "Additional excluded packages: ${additional_exclude_pkg[*]}"
220210
fi
221211

222-
223212
#-- パッケージリストをソートし重複を削除 --#
224213
_pkglist=($(printf "%s\n" "${_pkglist[@]}" | sort | uniq | tr "\n" " "))
225214

0 commit comments

Comments
 (0)