source: trunk/rules/get_sub_board.sh @ 517

Last change on this file since 517 was 517, checked in by amain, 6 years ago

Merge contrib branch 340:516. Main features added:

  • updated plugin architecture
  • improved patch system
  • bitten continous integration support
  • sever build fixed over time to remain in sync with OpenWrt
  • Property svn:executable set to *
File size: 991 bytes
Line 
1#!/bin/bash
2#
3# DebWrt - Debian on Embedded devices
4#
5# Copyright (C) 2010 Johan van Zoomeren <amain@debwrt.net>
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20CONFIG_FILE=$1
21BOARD=$2
22
23if [ -f $CONFIG_FILE ]; then
24        grep ^CONFIG_TARGET_${BOARD}[^=] ${CONFIG_FILE} \
25        | awk '{print length($0)"\t"$0}' \
26        | sort -n -r \
27        | cut -f 2- \
28        | head -1 \
29        | sed -e "s/CONFIG_TARGET_${BOARD}_//" -e 's/=.*//'
30fi
Note: See TracBrowser for help on using the repository browser.