From patchwork Wed Apr 7 05:31:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Roskin X-Patchwork-Id: 90925 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o375V7A0021275 for ; Wed, 7 Apr 2010 05:31:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752420Ab0DGFbK (ORCPT ); Wed, 7 Apr 2010 01:31:10 -0400 Received: from c60.cesmail.net ([216.154.195.49]:65104 "EHLO c60.cesmail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424Ab0DGFbJ (ORCPT ); Wed, 7 Apr 2010 01:31:09 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 07 Apr 2010 01:31:09 -0400 Received: from mj.roinet.com (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 4AFAF34C6A; Wed, 7 Apr 2010 01:35:38 -0400 (EDT) Subject: [PATCH 4/4] compat-wireless: find the actual remote URL To: "Luis R. Rodriguez" , linux-wireless@vger.kernel.org From: Pavel Roskin Date: Wed, 07 Apr 2010 01:31:08 -0400 Message-ID: <20100407053108.23575.92800.stgit@mj.roinet.com> In-Reply-To: <20100407053051.23575.94594.stgit@mj.roinet.com> References: <20100407053051.23575.94594.stgit@mj.roinet.com> User-Agent: StGit/0.15-58-geec5 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 07 Apr 2010 05:31:21 +0000 (UTC) diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh index af4479a..5d8068d 100755 --- a/scripts/admin-update.sh +++ b/scripts/admin-update.sh @@ -295,15 +295,20 @@ done DIR="$PWD" cd $GIT_TREE GIT_DESCRIBE=$(git describe) +GIT_BRANCH=$(git branch --no-color |sed -n 's/^\* //p') +GIT_BRANCH=${GIT_BRANCH-master} +GIT_REMOTE=$(git config branch.${GIT_BRANCH}.remote) +GIT_REMOTE=${GIT_REMOTE-origin} +GIT_REMOTE_URL=$(git config remote.${GIT_REMOTE}.url) +GIT_REMOTE_URL=${GIT_REMOTE_URL-unknown} echo -e "${GREEN}Updated${NORMAL} from local tree: ${BLUE}${GIT_TREE}${NORMAL}" -echo -e "Origin remote URL: ${CYAN}$(git config remote.origin.url)${NORMAL}" +echo -e "Origin remote URL: ${CYAN}${GIT_REMOTE_URL}${NORMAL}" cd $DIR if [ -d ./.git ]; then git describe > compat-release cd $GIT_TREE - TREE_NAME=$(git config remote.origin.url) - TREE_NAME=${TREE_NAME##*/} + TREE_NAME=${GIT_REMOTE_URL##*/} echo $TREE_NAME > $DIR/git-describe echo $GIT_DESCRIBE >> $DIR/git-describe