install.sh: openwrt-18.06 support

This commit is contained in:
sbwml 2022-08-18 00:31:52 +08:00
parent fdc82b08f4
commit 11f1133083
2 changed files with 7 additions and 3 deletions

View File

@ -23,7 +23,7 @@ A file list program that supports multiple storage.
-------------- --------------
## How to install prebuilt packages (OpenWrt 19 & 21 & 22 & master) ## How to install prebuilt packages (OpenWrt 18 & 19 & 21 & 22 & master)
- Login OpenWrt terminal (SSH) - Login OpenWrt terminal (SSH)

View File

@ -31,7 +31,7 @@ CHECK() (
echo -e "\r\n${GREEN_COLOR}Checking platform ...${RES}\r\n" echo -e "\r\n${GREEN_COLOR}Checking platform ...${RES}\r\n"
prebuilt="aarch64_cortex-a53 aarch64_cortex-a72 aarch64_generic arm_arm1176jzf-s_vfp arm_arm926ej-s arm_cortex-a15_neon-vfpv4 arm_cortex-a5_vfpv4 arm_cortex-a7 arm_cortex-a7_neon-vfpv4 arm_cortex-a8_vfpv3 arm_cortex-a9 arm_cortex-a9_neon arm_cortex-a9_vfpv3-d16 arm_fa526 arm_mpcore arm_xscale i386_pentium-mmx i386_pentium4 mips64_octeonplus mips_24kc mips_4kec mips_mips32 mipsel_24kc mipsel_24kc_24kf mipsel_74kc mipsel_mips32 x86_64" prebuilt="aarch64_cortex-a53 aarch64_cortex-a72 aarch64_generic arm_arm1176jzf-s_vfp arm_arm926ej-s arm_cortex-a15_neon-vfpv4 arm_cortex-a5_vfpv4 arm_cortex-a7 arm_cortex-a7_neon-vfpv4 arm_cortex-a8_vfpv3 arm_cortex-a9 arm_cortex-a9_neon arm_cortex-a9_vfpv3-d16 arm_fa526 arm_mpcore arm_xscale i386_pentium-mmx i386_pentium4 mips64_octeonplus mips_24kc mips_4kec mips_mips32 mipsel_24kc mipsel_24kc_24kf mipsel_74kc mipsel_mips32 x86_64"
verif=$(expr match "$prebuilt" ".*\($platform\)") verif=$(expr match "$prebuilt" ".*\($platform\)")
if [ "$version" != 19 -a "$version" != 21 -a "$version" != 22 ]; then if [ "$version" != 18 -a "$version" != 19 -a "$version" != 21 -a "$version" != 22 ]; then
echo -e "${RED_COLOR}Error! OpenWrt \"$(cat /etc/os-release | grep VERSION_ID | awk -F "[\"\"]" '{print $2}')\" version is not supported.${RES}" echo -e "${RED_COLOR}Error! OpenWrt \"$(cat /etc/os-release | grep VERSION_ID | awk -F "[\"\"]" '{print $2}')\" version is not supported.${RES}"
exit 1; exit 1;
elif [[ ! $verif ]]; then elif [[ ! $verif ]]; then
@ -56,7 +56,11 @@ DOWNLOAD() (
alist=$(cat $TMPDIR/releases.txt | grep "browser_download_url" | grep $platform.ipk | head -1 | awk '{print $2}' | sed 's/\"//g') alist=$(cat $TMPDIR/releases.txt | grep "browser_download_url" | grep $platform.ipk | head -1 | awk '{print $2}' | sed 's/\"//g')
luci_app=$(cat $TMPDIR/releases.txt | grep "browser_download_url" | grep luci-app-alist_ | head -1 | awk '{print $2}' | sed 's/\"//g') luci_app=$(cat $TMPDIR/releases.txt | grep "browser_download_url" | grep luci-app-alist_ | head -1 | awk '{print $2}' | sed 's/\"//g')
luci_i18n=$(cat $TMPDIR/releases.txt | grep "browser_download_url" | grep luci-i18n-alist-zh-cn | head -1 | awk '{print $2}' | sed 's/\"//g') if [ "$version" = 18 ]; then
luci_i18n=$(cat $TMPDIR/releases.txt | grep "browser_download_url" | grep openwrt-18.06_luci-i18n-alist-zh-cn | head -1 | awk '{print $2}' | sed 's/\"//g')
else
luci_i18n=$(cat $TMPDIR/releases.txt | grep "browser_download_url" | grep luci-i18n-alist-zh-cn | head -1 | awk '{print $2}' | sed 's/\"//g')
fi
# download # download
echo -e "${GREEN_COLOR}Downloading $alist ...${RES}" echo -e "${GREEN_COLOR}Downloading $alist ...${RES}"