Skip to content

Commit cb8e5dd

Browse files
committed
packages: add the package lime-owut
1 parent d01df63 commit cb8e5dd

3 files changed

Lines changed: 48 additions & 0 deletions

File tree

packages/lime-owut/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
include ../../libremesh.mk
2+
3+
define Package/$(PKG_NAME)
4+
TITLE:=$(PKG_NAME) allows to use owut OpenWrt Upgrade Tool in LibreMesh
5+
CATEGORY:=LibreMesh
6+
URL:=http://libremesh.org
7+
DEPENDS:=+owut
8+
PKGARCH:=all
9+
endef
10+
11+
$(eval $(call BuildPackage,$(PKG_NAME)))
12+

packages/lime-owut/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# lime-owut
2+
3+
A script to add libremesh repositories to owut build requests.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
openwrt_branch_ref="$(grep -m 1 "openwrt.org/" /etc/*/distfeeds* | sed 's|.*openwrt.org/\(.*\)|\1|' )"
4+
arch="$(grep OPENWRT_ARCH /etc/os-release | sed 's/OPENWRT_ARCH=\"\(.*\)\"/\1/')"
5+
6+
if [ '' != "$openwrt_branch_ref" ]; then
7+
if $(echo $openwrt_branch_ref | grep -q 'snapshots'); then
8+
openwrt_branch='openwrt-main'
9+
fi
10+
if $(echo $openwrt_branch_ref | grep -q 'releases'); then
11+
branch_n="$(echo $openwrt_branch_ref | sed 's/releases\///')"
12+
openwrt_branch="openwrt-${branch_n:0:5}"
13+
fi
14+
else
15+
echo "String not found 'openwrt.org' in default ${repo} feeds, cannot determine openwrt branch"
16+
fi
17+
18+
cat > /tmp/owut_repos << EOF
19+
repositories: {'libremesh': 'http://feed.libremesh.org/master/$openwrt_branch/x86_64',
20+
'libremesh_arch_packages': 'http://feed.libremesh.org/master/$openwrt_branch/$arch,
21+
'profiles': 'http://feed.libremesh.org/profiles/$openwrt_branch/x86_64'},
22+
23+
repository_keys: [ 'RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8', "-----BEGIN PUBLIC KEY-----\n\
24+
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdFJZ2qVti49Ol8LJZYuxgOCLowBS\n\
25+
8bI86a7zqhSbs5yon3JON7Yee7CQOgqwPOX5eMALGOu8iFGAqIRx5YjfYA==\n\
26+
-----END PUBLIC KEY-----" ]
27+
EOF
28+
29+
sed -ie '/diff_packages:\ contains_defaults/r /tmp/owut_repos' /usr/bin/owut
30+
sed -ie '/updates\ =\ check_updates\(\)/a updates.missing = false;' /usr/bin/owut
31+
32+
uci set attendedsysupgrade.server.url='https://sysupgrade.antennine.org'
33+
uci commit attendedsysupgrade

0 commit comments

Comments
 (0)