Create r4se_add_packages.sh

This commit is contained in:
Jiale Liu 2023-03-19 00:48:38 +08:00 committed by GitHub
parent 6f479de985
commit 342361cbef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,43 @@
#!/bin/bash
# {{ Add luci-app-diskman
(cd friendlywrt && {
mkdir -p package/luci-app-diskman
wget https://raw.githubusercontent.com/lisaac/luci-app-diskman/master/applications/luci-app-diskman/Makefile -O package/luci-app-diskman/Makefile
mkdir -p package/parted
wget https://raw.githubusercontent.com/lisaac/luci-app-diskman/master/Parted.Makefile -O package/parted/Makefile
})
cat >> configs/rockchip/01-nanopi <<EOL
CONFIG_PACKAGE_luci-app-diskman=y
CONFIG_PACKAGE_luci-app-diskman_INCLUDE_btrfs_progs=y
CONFIG_PACKAGE_luci-app-diskman_INCLUDE_lsblk=y
CONFIG_PACKAGE_smartmontools=y
EOL
# }}
# {{ Add luci-theme-argon
(cd friendlywrt/package && {
[ -d luci-theme-argon ] && rm -rf luci-theme-argon
git clone https://github.com/jerrykuku/luci-theme-argon.git --depth 1 -b master
})
echo "CONFIG_PACKAGE_luci-theme-argon=y" >> configs/rockchip/01-nanopi
sed -i -e 's/function init_theme/function old_init_theme/g' friendlywrt/target/linux/rockchip/armv8/base-files/root/setup.sh
cat > /tmp/appendtext.txt <<EOL
function init_theme() {
if uci get luci.themes.Argon >/dev/null 2>&1; then
uci set luci.main.mediaurlbase="/luci-static/argon"
uci commit luci
fi
}
EOL
sed -i -e '/boardname=/r /tmp/appendtext.txt' friendlywrt/target/linux/rockchip/armv8/base-files/root/setup.sh
# }}
# 以上为友善原带
# {{ 探索世界
(cd friendlywrt/package && {
[ -d helloworld ] && rm -rf helloworld
git clone https://github.com/fw876/helloworld.git --depth 1 -b master
})
# }}