public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-devel/gcc/files: fix_libtool_files.sh
@ 2012-05-15 18:53 Mike Frysinger (vapier)
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger (vapier) @ 2012-05-15 18:53 UTC (permalink / raw
  To: gentoo-commits

vapier      12/05/15 18:53:37

  Modified:             fix_libtool_files.sh
  Log:
  Use awk file in /usr/share/gcc-data and tweak the code to be POSIX since it is so simple. #415947 by Jim Faulkner.
  
  (Portage version: 2.2.0_alpha102/cvs/Linux x86_64)

Revision  Changes    Path
1.15                 sys-devel/gcc/files/fix_libtool_files.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?r1=1.14&r2=1.15

Index: fix_libtool_files.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- fix_libtool_files.sh	6 Sep 2007 11:00:44 -0000	1.14
+++ fix_libtool_files.sh	15 May 2012 18:53:36 -0000	1.15
@@ -1,7 +1,7 @@
-#!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+#!/bin/sh
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.14 2007/09/06 11:00:44 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.15 2012/05/15 18:53:36 vapier Exp $
 
 usage() {
 cat << "USAGE_END"
@@ -28,11 +28,10 @@
 	exit 1
 }
 
-if [[ $2 != "--oldarch" && $# -ne 1 ]] || \
-   [[ $2 == "--oldarch" && $# -ne 3 ]]
-then
-	usage
-fi
+case $2 in
+--oldarch) [ $# -ne 3 ] && usage ;;
+*)         [ $# -ne 1 ] && usage ;;
+esac
 
 ARGV1=$1
 ARGV2=$2
@@ -41,7 +40,7 @@
 source /etc/profile || exit 1
 source /etc/init.d/functions.sh || exit 1
 
-if [[ ${EUID} -ne 0 ]] ; then
+if [ ${EUID:-0} -ne 0 ] ; then
 	eerror "${0##*/}: Must be root."
 	exit 1
 fi
@@ -49,15 +48,12 @@
 # make sure the files come out sane
 umask 0022
 
-if [[ ${ARGV2} == "--oldarch" ]] && [[ -n ${ARGV3} ]] ; then
-	OLDCHOST=${ARGV3}
-else
-	OLDCHOST=
-fi
+OLDCHOST=
+[ "${ARGV2}" = "--oldarch" ] && OLDCHOST=${ARGV3}
 
-AWKDIR="/lib/rcscripts/awk"
+AWKDIR="/usr/share/gcc-data"
 
-if [[ ! -r ${AWKDIR}/fixlafiles.awk ]] ; then
+if [ ! -r "${AWKDIR}/fixlafiles.awk" ] ; then
 	eerror "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!"
 	exit 1
 fi
@@ -67,6 +63,6 @@
 export OLDVER OLDCHOST
 
 einfo "Scanning libtool files for hardcoded gcc library paths..."
-gawk -f "${AWKDIR}/fixlafiles.awk"
+exec gawk -f "${AWKDIR}/fixlafiles.awk"
 
 # vim:ts=4






^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/gcc/files: fix_libtool_files.sh
@ 2012-05-18 21:28 Mike Frysinger (vapier)
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger (vapier) @ 2012-05-18 21:28 UTC (permalink / raw
  To: gentoo-commits

vapier      12/05/18 21:28:56

  Modified:             fix_libtool_files.sh
  Log:
  Use `.` rather than `source` now that we use /bin/sh as pointed out by pesa.
  
  (Portage version: 2.2.0_alpha102/cvs/Linux x86_64)

Revision  Changes    Path
1.16                 sys-devel/gcc/files/fix_libtool_files.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?r1=1.15&r2=1.16

Index: fix_libtool_files.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- fix_libtool_files.sh	15 May 2012 18:53:36 -0000	1.15
+++ fix_libtool_files.sh	18 May 2012 21:28:56 -0000	1.16
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.15 2012/05/15 18:53:36 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.16 2012/05/18 21:28:56 vapier Exp $
 
 usage() {
 cat << "USAGE_END"
@@ -37,8 +37,8 @@
 ARGV2=$2
 ARGV3=$3
 
-source /etc/profile || exit 1
-source /etc/init.d/functions.sh || exit 1
+. /etc/profile || exit 1
+. /etc/init.d/functions.sh || exit 1
 
 if [ ${EUID:-0} -ne 0 ] ; then
 	eerror "${0##*/}: Must be root."






^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-devel/gcc/files: fix_libtool_files.sh
@ 2014-05-20  8:00 Ryan Hill (rhill)
  0 siblings, 0 replies; 3+ messages in thread
From: Ryan Hill (rhill) @ 2014-05-20  8:00 UTC (permalink / raw
  To: gentoo-commits

rhill       14/05/20 08:00:40

  Modified:             fix_libtool_files.sh
  Log:
  Stop using einfo/eerror in fix_libtool_files.sh to avoid a dependency on
  sys-apps/gentoo-functions (bug #504434).
  
  Signed-off-by: Ryan Hill <rhill@gentoo.org>
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 957A8463)

Revision  Changes    Path
1.17                 sys-devel/gcc/files/fix_libtool_files.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh?r1=1.16&r2=1.17

Index: fix_libtool_files.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- fix_libtool_files.sh	18 May 2012 21:28:56 -0000	1.16
+++ fix_libtool_files.sh	20 May 2014 08:00:40 -0000	1.17
@@ -1,7 +1,7 @@
 #!/bin/sh
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.16 2012/05/18 21:28:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.17 2014/05/20 08:00:40 rhill Exp $
 
 usage() {
 cat << "USAGE_END"
@@ -38,10 +38,9 @@
 ARGV3=$3
 
 . /etc/profile || exit 1
-. /etc/init.d/functions.sh || exit 1
 
 if [ ${EUID:-0} -ne 0 ] ; then
-	eerror "${0##*/}: Must be root."
+	echo "${0##*/}: Must be root."
 	exit 1
 fi
 
@@ -54,7 +53,7 @@
 AWKDIR="/usr/share/gcc-data"
 
 if [ ! -r "${AWKDIR}/fixlafiles.awk" ] ; then
-	eerror "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!"
+	echo "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!"
 	exit 1
 fi
 
@@ -62,7 +61,7 @@
 
 export OLDVER OLDCHOST
 
-einfo "Scanning libtool files for hardcoded gcc library paths..."
+echo "Scanning libtool files for hardcoded gcc library paths..."
 exec gawk -f "${AWKDIR}/fixlafiles.awk"
 
 # vim:ts=4





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-20  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 18:53 [gentoo-commits] gentoo-x86 commit in sys-devel/gcc/files: fix_libtool_files.sh Mike Frysinger (vapier)
  -- strict thread matches above, loose matches on Subject: below --
2012-05-18 21:28 Mike Frysinger (vapier)
2014-05-20  8:00 Ryan Hill (rhill)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox