mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
21 lines
565 B
Bash
21 lines
565 B
Bash
#!/bin/bash -e
|
|
function sed_wrapper() {
|
|
# if run in linux, use sed -i
|
|
# if run in macos, use sed -i ''
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
sed -i "$@"
|
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
/usr/local/opt/gnu-sed/libexec/gnubin/sed -i "$@"
|
|
fi
|
|
}
|
|
|
|
sed_wrapper '/luci.mk/ c\include $(TOPDIR)/feeds/luci/luci.mk' packages/luci-app-natmap/Makefile
|
|
|
|
# remove the last \
|
|
dep=${dep%\\}
|
|
if [[ $1 =~ '21.02'* ]]; then
|
|
dep="$dep +ip6tables-mod-nat +iptables-mod-extra +iptables-mod-tproxy"
|
|
else
|
|
dep="$dep +kmod-nft-tproxy"
|
|
fi
|