tools/unpack-archive
changeset 415 02da8ebe6414
parent 405 c601bc5ddd76
child 450 13efd215ca04
equal deleted inserted replaced
414:15d32c92bddd 415:02da8ebe6414
     4 #
     4 #
     5 # The contents of this file are subject to the terms of the
     5 # The contents of this file are subject to the terms of the
     6 # Common Development and Distribution License (the "License").
     6 # Common Development and Distribution License (the "License").
     7 # You may not use this file except in compliance with the License.
     7 # You may not use this file except in compliance with the License.
     8 #
     8 #
     9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     9 # You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
    10 # or http://www.opensolaris.org/os/licensing.
    10 # or http://www.opensolaris.org/os/licensing.
    11 # See the License for the specific language governing permissions
    11 # See the License for the specific language governing permissions
    12 # and limitations under the License.
    12 # and limitations under the License.
    13 #
    13 #
    14 # When distributing Covered Code, include this CDDL HEADER in each
    14 # When distributing Covered Code, include this CDDL HEADER in each
    15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
    15 # file and include the License file at src/OPENSOLARIS.LICENSE.
    16 # If applicable, add the following below this CDDL HEADER, with the
    16 # If applicable, add the following below this CDDL HEADER, with the
    17 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # fields enclosed by brackets "[]" replaced with your own identifying
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    58 esac
    58 esac
    59 
    59 
    60 /bin/sh -c "${COMMAND}"
    60 /bin/sh -c "${COMMAND}"
    61 
    61 
    62 if [ $# -eq 2 -a -d "${2}" ] ; then
    62 if [ $# -eq 2 -a -d "${2}" ] ; then
    63 	${FIND} ${2} -type d | ${XARGS} ${CHMOD} 0755
    63 	${FIND} ${2} -type d | ${XARGS} -i ${CHMOD} 0755 "{}"
    64 	${FIND} ${2} -type f | ${XARGS} ${CHMOD} a+r
    64 	${FIND} ${2} -type f | ${XARGS} -i ${CHMOD} a+r "{}"
    65 fi
    65 fi