vapier      14/03/08 21:29:38

  Modified:             ccache-config-2
  Log:
  Use `command` rather than `type` #503428 by Naohiro Aota.
  
  (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 
D2E96200)

Revision  Changes    Path
1.3                  dev-util/ccache/files/ccache-config-2

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.3&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?rev=1.3&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/ccache/files/ccache-config-2?r1=1.2&r2=1.3

Index: ccache-config-2
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-util/ccache/files/ccache-config-2,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ccache-config-2     28 Sep 2013 22:44:47 -0000      1.2
+++ ccache-config-2     8 Mar 2014 21:29:38 -0000       1.3
@@ -2,8 +2,8 @@
 #
 # ccache-config - helper script for ccache and its ebuild
 #
-# Copyright 2003-2013 Superlucidity Services, LLC
-# Copyright 2013 Gentoo Foundation
+# Copyright 2003-2014 Superlucidity Services, LLC
+# Copyright 2013-2014 Gentoo Foundation
 # This program licensed under the GNU GPL version 2.
 #
 # This script developed by Zachary T Welch at Superlucidity Services, LLC
@@ -54,10 +54,10 @@
        # Search the PATH for the specified compiler
        #  then create shadow link in /usr/lib/ccache/bin to ccache
 
-       if [ -n "$(type -p ${1})" ]; then
+       if command -v "$1" >/dev/null ; then
                # first be sure any old link is removed
                _CC_QUIET=1
-               cc_remove_link "${1}"
+               cc_remove_link "$1"
                unset _CC_QUIET
 
                # then create the new link
@@ -77,14 +77,14 @@
 ###
 # main routine
 
-case "${1}" in
+case $1 in
        --install-links )
-               cc_links install "${2}"
+               cc_links install "$2"
                ;;
        --remove-links )
-               cc_links remove "${2}"
+               cc_links remove "$2"
                ;;
        * )
-               echo "usage: ${0} {--install-links|--remove-links} [ CHOST ]"
+               echo "usage: $0 {--install-links|--remove-links} [ CHOST ]"
                ;;
 esac




Reply via email to