Skip to content

Commit 2152219

Browse files
committed
[fix] : Fixed not being able to get the description of .add
1 parent dbdf44a commit 2152219

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tools/channel.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,16 @@ desc() {
104104
if [[ ! "$(bash "${script_path}/tools/channel.sh" -a ${arch} -n -b check "${1}")" = "correct" ]]; then
105105
exit 1
106106
fi
107-
if [[ ! "$(cat "${script_path}/channels/${1}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_version}" ]] && [[ "${opt_nochkver}" = false ]]; then
107+
local _channel
108+
if [[ ! -d "${script_path}/channels/${1}" ]]; then
109+
_channel="${1}.add"
110+
else
111+
_channel="${1}"
112+
fi
113+
if [[ ! "$(cat "${script_path}/channels/${_channel}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_version}" ]] && [[ "${opt_nochkver}" = false ]]; then
108114
"${script_path}/tools/msg.sh" --noadjust -l 'ERROR:' --noappname error "Not compatible with AlterISO3"
109-
elif [[ -f "${script_path}/channels/${1}/description.txt" ]]; then
110-
echo -ne "$(cat "${script_path}/channels/${1}/description.txt")\n"
115+
elif [[ -f "${script_path}/channels/${_channel}/description.txt" ]]; then
116+
echo -ne "$(cat "${script_path}/channels/${_channel}/description.txt")\n"
111117
else
112118
"${script_path}/tools/msg.sh" --noadjust -l 'WARN :' --noappname warn "This channel does not have a description.txt"
113119
fi

0 commit comments

Comments
 (0)