|
Revision 2295, 0.7 kB
(checked in by tg, 2 years ago)
|
more from the “coolz” departement:
• get rid of dependency on external ipkg and python stuff
• one distfile less too ;)
• while here, remove executable bits on more shell scripts
tested with a defaultconfig full bootstrap (cleandir+v)
|
| Line | |
|---|
| 1 |
BASE=http://www.freewrt.org |
|---|
| 2 |
TARGET=$1 |
|---|
| 3 |
CONTROL=$2 |
|---|
| 4 |
VERSION=$3 |
|---|
| 5 |
ARCH=$4 |
|---|
| 6 |
|
|---|
| 7 |
WD=$(pwd) |
|---|
| 8 |
|
|---|
| 9 |
mkdir -p "$TARGET/CONTROL" |
|---|
| 10 |
grep '^[^(Version|Architecture)]' "$CONTROL" > "$TARGET/CONTROL/control" |
|---|
| 11 |
grep '^Maintainer' "$CONTROL" 2>&1 >/dev/null || \ |
|---|
| 12 |
echo "Maintainer: FreeWRT Developers Team <freewrt-developers@freewrt.org>" >> "$TARGET/CONTROL/control" |
|---|
| 13 |
grep '^Source' "$CONTROL" 2>&1 >/dev/null || { |
|---|
| 14 |
pkgbase=$(echo "$WD" | sed -e "s|^$TOPDIR/||g") |
|---|
| 15 |
[ "$pkgbase" = "$WD" ] && src="N/A" || src="$BASE/$pkgbase" |
|---|
| 16 |
echo "Source: $src" >> "$TARGET/CONTROL/control" |
|---|
| 17 |
} |
|---|
| 18 |
echo "Version: $VERSION" >> "$TARGET/CONTROL/control" |
|---|
| 19 |
echo "Architecture: $ARCH" >> "$TARGET/CONTROL/control" |
|---|
| 20 |
chmod 644 "$TARGET/CONTROL/control" |
|---|