rejig dedup, prepare for RMA in 2.15

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1260 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2012-12-31 22:39:54 +00:00
parent d661c8016e
commit 25523058f0
2 changed files with 15 additions and 10 deletions

View File

@ -6,7 +6,12 @@ echo "Content-Type: text/plain"
echo echo
if [ "$rma" = 1 ]; then if [ "$rma" = 1 ]; then
modver="`cat /etc/modversion`"
if [ "$modver" -ge 215 ]; then
touch /var/lib/humaxtv_backup/.rma
else
touch /var/lib/humaxtv/.rma touch /var/lib/humaxtv/.rma
fi
else else
touch /var/lib/humaxtv/mod/_RESET_CUSTOM_FIRMWARE_ENVIRONMENT touch /var/lib/humaxtv/mod/_RESET_CUSTOM_FIRMWARE_ENVIRONMENT
fi fi

View File

@ -53,15 +53,6 @@ proc dedupnormalise {title {reserve ""}} {
} }
} }
# if still short, add the reserve string.
if {[string length $title] < 10} {
if {[string match "${title}*" $reserve]} {
set title $reserve
} else {
append title " $reserve"
}
}
if {[dict exists $seriesmap $title]} { if {[dict exists $seriesmap $title]} {
set ntitle "$seriesmap($title): $title" set ntitle "$seriesmap($title): $title"
set title $ntitle set title $ntitle
@ -73,6 +64,15 @@ proc dedupnormalise {title {reserve ""}} {
} }
} }
# if still short, add the reserve string.
if {[string length $title] < 10} {
if {[string match "${title}*" $reserve]} {
set title $reserve
} else {
append title " $reserve"
}
}
# Shorten if too long. # Shorten if too long.
if {[string length $title] > 40} { if {[string length $title] > 40} {
set title [string range $title 0 39] set title [string range $title 0 39]