diff --git a/.github/workflows/lo-test.yml b/.github/workflows/lo-test.yml index b30c385..7309189 100644 --- a/.github/workflows/lo-test.yml +++ b/.github/workflows/lo-test.yml @@ -40,13 +40,13 @@ jobs: sudo curl -sL https://raw.githubusercontent.com/klever1988/nanopi-openwrt/zstd-bin/zstd | sudo tee /usr/bin/zstd > /dev/null for i in {1..6} do - curl -sL --fail https://github.com/klever1988/sshactions/releases/download/cache/lede.$DEVICE.img.zst.0$i || break + curl -sL --fail https://github.com/klever1988/sshactions/releases/download/cache/lede.$DEVICE.img.zst.0$i || break done | zstdmt -d -o lede.img || (truncate -s 10g lede.img && mkfs.btrfs -M lede.img) LOOP_DEVICE=$(losetup -f) && echo "LOOP_DEVICE=$LOOP_DEVICE" >> $GITHUB_ENV sudo losetup -P --direct-io $LOOP_DEVICE lede.img mkdir lede && sudo mount -o nossd,autodefrag,compress=zstd $LOOP_DEVICE lede if [ -d 'lede/.git' ]; then - cd lede && git config --local user.email "action@github.com" && git config --local user.name "GitHub Action" && \ + cd lede git fetch && git reset --hard origin/openwrt-18.06-k5.4 && git merge openwrt-18.06 || true else sudo chown $USER:$(id -gn) lede && (cd lede && git init && git remote add -t openwrt-18.06-k5.4 -f origin https://github.com/immortalwrt/immortalwrt && git checkout openwrt-18.06-k5.4) diff --git a/merge_packages.sh b/merge_packages.sh index 7fe7fc3..e8b5362 100644 --- a/merge_packages.sh +++ b/merge_packages.sh @@ -1,15 +1,25 @@ function merge_package(){ - rm -rf $1/.git - find package/ -type d -name $1 | xargs -r rm -r - mv $1 package/ + pn=`echo $1 | rev | cut -d'/' -f 1 | rev` + find package/ -type d -name $pn | xargs -r rm -r + if [ ! -z "$2" ]; then + find package/ -type d -name $2 | xargs -r rm -r + fi + + if [[ $1 == *'/trunk/'* ]]; then + svn export $1 + else + git clone $3 --depth=1 $1 + rm -rf $pn/.git + fi + + mv $pn package/ } -rm -rf luci-app-godproxy && git clone --depth=1 https://github.com/project-lede/luci-app-godproxy && merge_package luci-app-godproxy -rm -rf luci-theme-argon && git clone --depth=1 -b 18.06 https://github.com/jerrykuku/luci-theme-argon && merge_package luci-theme-argon - -rm -rf luci-app-ksmbd && svn co https://github.com/coolsnowwolf/lede/trunk/package/lean/luci-app-cifsd && merge_package luci-app-cifsd -rm -rf ksmbd && svn co https://github.com/coolsnowwolf/packages/trunk/kernel/ksmbd && merge_package ksmbd -rm -rf ksmbd-tools && svn co https://github.com/coolsnowwolf/packages/trunk/net/ksmbd-tools && merge_package ksmbd-tools +merge_package https://github.com/project-lede/luci-app-godproxy +merge_package https://github.com/jerrykuku/luci-theme-argon luci-theme-argon "-b 18.06" +merge_package https://github.com/coolsnowwolf/lede/trunk/package/lean/luci-app-cifsd luci-app-ksmbd +merge_package https://github.com/coolsnowwolf/packages/trunk/kernel/ksmbd +merge_package https://github.com/coolsnowwolf/packages/trunk/net/ksmbd-tools if [ $DEVICE = 'r2s' ]; then mkdir -p target/linux/rockchip/armv8/base-files/usr/bin &&\ @@ -20,8 +30,7 @@ wget https://github.com/friendlyarm/friendlywrt/raw/master-v19.07.1/target/linux chmod +x target/linux/rockchip/armv8/base-files/etc/init.d/fa-rk3328-pwmfan mkdir -p target/linux/rockchip/armv8/base-files/etc/rc.d &&\ ln -sf ../init.d/fa-rk3328-pwmfan target/linux/rockchip/armv8/base-files/etc/rc.d/S96fa-rk3328-pwmfan - -rm -rf luci-app-oled && git clone --depth=1 https://github.com/NateLol/luci-app-oled && merge_package luci-app-oled +merge_package https://github.com/NateLol/luci-app-oled fi sed -i 's/192.168.1.1/192.168.2.1/' package/base-files/files/bin/config_generate