From cc18825fe0af6ea3037a4ae1cc7c2f8e6c92724d Mon Sep 17 00:00:00 2001 From: pantonshire Date: Mon, 25 May 2026 19:31:10 +0100 Subject: [PATCH] install script --- install.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..afd2afd --- /dev/null +++ b/install.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +OPENWRT_DIR="$1" +if test -z "$OPENWRT_DIR"; then + >&2 echo 'usage: ./install.sh openwrt-dir' + exit 1 +fi + +cd "$OPENWRT_DIR" +if test ! -x scripts/feeds; then + >&2 echo "no scripts/feeds, is $OPENWRT_DIR correct?" + exit 1 +fi + +if test -e feeds.conf && cat feeds.conf | awk '{print $2}' | grep -qE '^pantonshire$'; then + >&2 echo 'feed already installed' + exit 1 +fi + +echo 'src-git pantonshire https://git.pantonshire.com/tom/openwrt_feed.git' >> feeds.conf +./scripts/feeds update pantonshire +./scripts/feeds install -a -p pantonshire +