Skip to content

Commit 52679b8

Browse files
committed
Update
1 parent b09f81c commit 52679b8

3 files changed

Lines changed: 24 additions & 15 deletions

File tree

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android {
2121
targetSdkVersion 28
2222
versionCode Integer.parseInt(new java.text.SimpleDateFormat("yyMMddHH").format(new Date()))
2323
// versionCode 26021101
24-
versionName "1.4.1"
24+
versionName "1.4.2"
2525
}
2626
signingConfigs {
2727
release {

app/src/main/assets/home/etc/start-early.rc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ if checkonline; then
99
# Tải về nhật ký
1010
echo -e "Download the log and the latest version..."
1111
timeout 20 taive 'https://raw.githubusercontent.com/Zenlua/Tool-Tree/refs/heads/main/Version.md' $TEMP/Version.md
12-
text_num_1="$(grep -nm1 Version: $TEMP/Version.md | tail -1 | cut -d: -f1)"
13-
text_num_2="$(grep -nm5 Version: $TEMP/Version.md | tail -1 | cut -d: -f1)"
14-
sed -n "$text_num_1,$((text_num_2 - 1))p" $TEMP/Version.md | sed -e "s|\*\*||g" -e "s|+|•|g" | trans -b "$LANGUAGE-$COUNTRY" > $TEMP/version.txt
15-
12+
inputtextver="$(cat $TEMP/Version.md | sed -e 's|\*\*||g' -e 's|+|•|g')"
13+
echo "$inputtextver" | awk 'BEGIN{RS="\\*\\*Version:"} NR==2 {printf "**Version:%s", $0}' | trans -b "$LANGUAGE-$COUNTRY" > $TEMP/ver1.txt
14+
echo "$inputtextver" | awk 'BEGIN{RS="\\*\\*Version:"} NR==3 {printf "**Version:%s", $0}' | trans -b "$LANGUAGE-$COUNTRY" > $TEMP/ver2.txt
15+
echo "$inputtextver" | awk 'BEGIN{RS="\\*\\*Version:"} NR==4 {printf "**Version:%s", $0}' | trans -b "$LANGUAGE-$COUNTRY" > $TEMP/ver3.txt
16+
echo "$inputtextver" | awk 'BEGIN{RS="\\*\\*Version:"} NR==5 {printf "**Version:%s", $0}' | trans -b "$LANGUAGE-$COUNTRY" > $TEMP/ver4.txt
17+
1618
# Thông báo cập nhật
1719
websums="$(xem https://api.github.com/repos/Zenlua/Tool-Tree/releases/latest)"
1820
websum="$(echo "$websums" | jq -r .assets[0].digest | cut -d: -f2)"
@@ -22,20 +24,16 @@ if checkonline; then
2224
elif [[ ${PACKAGE_VERSION_NAME//./} == $tagname ]];then
2325
if [[ "$websum" != "$(checksum "$PATH_APK")" ]] && [[ -n $websum ]];then
2426
if [ ! -f $TEMP/update ] && [ -n "$tagname" ];then
25-
notiservice --am --id 12345 --message "$update_text_6"
27+
showtoast --am "$update_text_6"
2628
echo "$tagname" > $TEMP/update
27-
sleep 10
28-
notiservice --am --id 12345 -d true
2929
fi
3030
else
3131
[ -f $TEMP/update ] && rm -f $TEMP/update
3232
fi
3333
else
3434
if [ ! -f $TEMP/update ] && [ -n "$tagname" ];then
35-
notiservice --am --id 12345 --message "$update_text_6"
35+
showtoast --am "$update_text_6"
3636
echo "$tagname" > $TEMP/update
37-
sleep 10
38-
notiservice --am --id 12345 -d true
3937
fi
4038
fi
4139
fi

app/src/main/assets/home/etc/tool-tree.rc

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,12 +477,23 @@ showtoast "'$update_text_4'"
477477
fi
478478
</set>
479479
</action>
480-
<text>
481-
<desc>'"$(cat $TEMP/version.txt 2>/dev/null)"'</desc>
480+
</group>
481+
482+
<group><text>
483+
<desc>'"$(cat $TEMP/ver1.txt 2>/dev/null)"'</desc>
484+
</text></group>
485+
<group><text>
486+
<desc>'"$(cat $TEMP/ver2.txt 2>/dev/null)"'</desc>
487+
</text></group>
488+
<group><text>
489+
<desc>'"$(cat $TEMP/ver3.txt 2>/dev/null)"'</desc>
490+
</text></group>
491+
<group><text>
492+
<desc>'"$(cat $TEMP/ver4.txt 2>/dev/null)"'</desc>
482493
<slices>
483494
<slice photo="'$ETC'/icon/tool-tree.jpg" />
484-
</slices>
485-
</text>
495+
</slices></text></group>
496+
486497
</group>'
487498
}
488499

0 commit comments

Comments
 (0)