2N/A# The contents of this file are subject to the terms of the 2N/A# Common Development and Distribution License (the "License"). 2N/A# You may not use this file except in compliance with the License. 2N/A# See the License for the specific language governing permissions 2N/A# and limitations under the License. 2N/A# When distributing Covered Code, include this CDDL HEADER in each 2N/A# If applicable, add the following below this CDDL HEADER, with the 2N/A# fields enclosed by brackets "[]" replaced with your own identifying 2N/A# information: Portions Copyright [yyyy] [name of copyright owner] 5475N/A# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. 2N/A# A simple program to uncompress and unpack source archive files into a target 2N/A# directory and fix permissions if requested. 2N/A# recurse down a directory tree opening permissions so that others may access 2N/A print "Changing %s from %4.4o to %4.4o" %
(path, 2N/A print "Usage: %s [-v|--verbose] [-f|--fix-permissions] [-r|--relocate-to (dir)] (file)" %
(sys.argv[0].split('/')[-1]) 2N/A ["fix-permissions", "relocate-to=", "verbose"]) 2N/A elif opt in [
"-f",
"--fix-permissions" ]:
2N/A # extract the archive contents 2N/A # open up the permissions on what we extracted 2N/A # move everything in the tempdir here 2N/A # rename the tempdir and open it's permissions