[brcm63xx] re-instate SPI support
[openwrt.git] / scripts / make-ipkg-dir.sh
1 #!/bin/sh
2 BASE=http://svn.openwrt.org/openwrt/trunk/openwrt
3 TARGET=$1
4 CONTROL=$2
5 VERSION=$3
6 ARCH=$4
7
8 WD=$(pwd)
9
10 mkdir -p "$TARGET/CONTROL"
11 grep '^[^(Version|Architecture)]' "$CONTROL" > "$TARGET/CONTROL/control"
12 grep '^Maintainer' "$CONTROL" 2>&1 >/dev/null || \
13 echo "Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>" >> "$TARGET/CONTROL/control"
14 grep '^Source' "$CONTROL" 2>&1 >/dev/null || {
15 pkgbase=$(echo "$WD" | sed -e "s|^$TOPDIR/||g")
16 [ "$pkgbase" = "$WD" ] && src="N/A" || src="$BASE/$pkgbase"
17 echo "Source: $src" >> "$TARGET/CONTROL/control"
18 }
19 echo "Version: $VERSION" >> "$TARGET/CONTROL/control"
20 echo "Architecture: $ARCH" >> "$TARGET/CONTROL/control"
21 chmod 644 "$TARGET/CONTROL/control"
This page took 0.044616 seconds and 5 git commands to generate.